[PATCH 001 of 14] knfsd: Improve the test for cross-device-rename in nfsd

From: NeilBrown
Date: Tue Jun 27 2006 - 03:18:39 EST



Just testing the i_sb isn't really enough, at least
the vfsmnt must be the same. Thanks Al.

Cc: Al Viro <viro@xxxxxxxxxxxxxxxx>

### Diffstat output
./fs/nfsd/vfs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff .prev/fs/nfsd/vfs.c ./fs/nfsd/vfs.c
--- .prev/fs/nfsd/vfs.c 2006-06-27 12:15:18.000000000 +1000
+++ ./fs/nfsd/vfs.c 2006-06-27 12:15:21.000000000 +1000
@@ -1556,7 +1556,7 @@ nfsd_rename(struct svc_rqst *rqstp, stru
tdir = tdentry->d_inode;

err = (rqstp->rq_vers == 2) ? nfserr_acces : nfserr_xdev;
- if (fdir->i_sb != tdir->i_sb)
+ if (ffhp->fh_export != tfhp->fh_export)
goto out;

err = nfserr_perm;
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/