Skip to content

Commit

Permalink
[PATCH] 9p: fix rename return code
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
ericvh authored and Linus Torvalds committed Jan 26, 2007
1 parent f94b347 commit 621997c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/9p/vfs_inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 621997c

Please sign in to comment.