Re: [PATCH 01/15] cifs: eliminate redundant xdev check in cifs_rename

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 25 Aug 2010 11:34:07 -0500
Steve French <smfrench@xxxxxxxxx> wrote:

> On Fri, Aug 20, 2010 at 2:31 PM, Jeff Layton <jlayton@xxxxxxxxxx> wrote:
> > The VFS always checks that the source and target of a rename are on the
> > same vfsmount, and hence have the same superblock. So, this check is
> > redundant. Remove it and simplify the error handling.
> 
> I looked more closely at this, and although EXDEV is checked for in one
> place (early in the rename syscall), there are other paths to iop->cifs_rename
> (nfs server and cachefiles for example call vfs_rename directly)
> which do not check this, so it looks like the cifs EXDEV check
> is not redundant and should be kept.
> 
> 
> 

(cc'ing linux-fsdevel)

The nfs server checks for it. In nfsd_rename:

        host_err = -EXDEV;
        if (ffhp->fh_export->ex_path.mnt != tfhp->fh_export->ex_path.mnt)
                goto out_dput_new;


I don't think cachefiles would work if you split the cache directory
across multiple filesystems. Most filesystems don't check for this on
their own, so I'm not sure why we need to have cifs do this in a
special fashion.

-- 
Jeff Layton <jlayton@xxxxxxxxxx>
--
To unsubscribe from this list: send the line "unsubscribe linux-cifs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux