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, Aug 25, 2010 at 11:34:07AM -0500, Steve French 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.

If ->rename evers gets called with dentries on different superblocks
hell would break lose.  nfsd also explicitly checks for it,
and in cachefiles it can't happen because we do a lookup_one_len
on the local fs for the target.  Note that these cases matter for
cifs anyway given that it doesn't provide export ops.

There is no need to keep this junk around.

--
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