Эх сурвалжийг харах

[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>
Eric Van Hensbergen 18 жил өмнө
parent
commit
621997cd39
1 өөрчлөгдсөн 1 нэмэгдсэн , 1 устгасан
  1. 1 1
      fs/9p/vfs_inode.c

+ 1 - 1
fs/9p/vfs_inode.c

@@ -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;
 	}