diff options
author | NeilBrown <neilb@suse.de> | 2006-06-30 04:56:10 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-06-30 14:25:39 -0400 |
commit | a56f39375a7bd183149c18286389e4a58ac9bc95 (patch) | |
tree | de85fd3c6917ebf75c37d32eaa33707c1a0c1111 /fs | |
parent | 8c2a6a40902323b739e4e740ebf91ee357a5de5b (diff) |
[PATCH] knfsd: improve the test for cross-device-rename in nfsd
Just testing the i_sb isn't really enough, at least the vfsmnt must be the
same. Thanks Al.
Cc: Al Viro <viro@ftp.linux.org.uk>
Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/nfsd/vfs.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/nfsd/vfs.c b/fs/nfsd/vfs.c index 245eaa1fb59b..b653ede37e66 100644 --- a/fs/nfsd/vfs.c +++ b/fs/nfsd/vfs.c | |||
@@ -1553,7 +1553,7 @@ nfsd_rename(struct svc_rqst *rqstp, struct svc_fh *ffhp, char *fname, int flen, | |||
1553 | tdir = tdentry->d_inode; | 1553 | tdir = tdentry->d_inode; |
1554 | 1554 | ||
1555 | err = (rqstp->rq_vers == 2) ? nfserr_acces : nfserr_xdev; | 1555 | err = (rqstp->rq_vers == 2) ? nfserr_acces : nfserr_xdev; |
1556 | if (fdir->i_sb != tdir->i_sb) | 1556 | if (ffhp->fh_export != tfhp->fh_export) |
1557 | goto out; | 1557 | goto out; |
1558 | 1558 | ||
1559 | err = nfserr_perm; | 1559 | err = nfserr_perm; |