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

Commit 621997cd authored by Eric Van Hensbergen's avatar Eric Van Hensbergen Committed by Linus Torvalds
Browse files

[PATCH] 9p: fix rename return code



9p doesn't handle renames between directories -- however, we were returning
EPERM instead of EXDEV when we detected this case.

Signed-off-by: default avatarEric Van Hensbergren <ericvh@gmail.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent f94b3470
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -767,7 +767,7 @@ v9fs_vfs_rename(struct inode *old_dir, struct dentry *old_dentry,
	/* 9P can only handle file rename in the same directory */
	if (memcmp(&olddirfid->qid, &newdirfid->qid, sizeof(newdirfid->qid))) {
		dprintk(DEBUG_ERROR, "old dir and new dir are different\n");
		retval = -EPERM;
		retval = -EXDEV;
		goto FreeFcallnBail;
	}