Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[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: Eric Van Hensbergren <ericvh@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Eric Van Hensbergen and committed by
Linus Torvalds
621997cd f94b3470

+1 -1
+1 -1
fs/9p/vfs_inode.c
··· 767 767 /* 9P can only handle file rename in the same directory */ 768 768 if (memcmp(&olddirfid->qid, &newdirfid->qid, sizeof(newdirfid->qid))) { 769 769 dprintk(DEBUG_ERROR, "old dir and new dir are different\n"); 770 - retval = -EPERM; 770 + retval = -EXDEV; 771 771 goto FreeFcallnBail; 772 772 } 773 773