Skip to contentSkip to conversation

9p: fix rename return code

PATCH RESEND New Eric Van Hensbergen 1 participant 1 message Jan 18, 2007 9P file system

lore
Share & tools
lore
#0 lore raw

PATCH RESEND 1/1 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.

---
 fs/9p/vfs_inode.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
fs/9p/vfs_inode.c +1 -1
index 18f26cd..05d30e8 100644
@@ -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;
 	}
 
Signature · 1 line
1.5.0.rc1.gdf1b-dirty