Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a56f3937 authored by NeilBrown's avatar NeilBrown Committed by Linus Torvalds
Browse files

[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: default avatarNeil Brown <neilb@suse.de>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 8c2a6a40
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1553,7 +1553,7 @@ nfsd_rename(struct svc_rqst *rqstp, struct svc_fh *ffhp, char *fname, int flen,
	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;