summaryrefslogtreecommitdiffstats
path: root/fs/cifs/inode.c
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@arm.linux.org.uk>2010-07-27 11:42:48 +0200
committerRussell King <rmk+kernel@arm.linux.org.uk>2010-07-27 11:42:52 +0200
commit4708ac49305bbcd511600d4af71a4c6dca15af65 (patch)
tree77ba5c83a7d4f4a119e3fd524d82adc297df1e35 /fs/cifs/inode.c
parentARM: 6225/1: make TCM allocation static and common for all archs (diff)
parentMerge master.kernel.org:/home/rmk/linux-2.6-arm (diff)
downloadlinux-4708ac49305bbcd511600d4af71a4c6dca15af65.tar.xz
linux-4708ac49305bbcd511600d4af71a4c6dca15af65.zip
Merge branch 'origin' into misc
Diffstat (limited to 'fs/cifs/inode.c')
-rw-r--r--fs/cifs/inode.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/cifs/inode.c b/fs/cifs/inode.c
index 62b324f26a56..6f0683c68952 100644
--- a/fs/cifs/inode.c
+++ b/fs/cifs/inode.c
@@ -1401,6 +1401,10 @@ cifs_do_rename(int xid, struct dentry *from_dentry, const char *fromPath,
if (rc == 0 || rc != -ETXTBSY)
return rc;
+ /* open-file renames don't work across directories */
+ if (to_dentry->d_parent != from_dentry->d_parent)
+ return rc;
+
/* open the file to be renamed -- we need DELETE perms */
rc = CIFSSMBOpen(xid, pTcon, fromPath, FILE_OPEN, DELETE,
CREATE_NOT_DIR, &srcfid, &oplock, NULL,