diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-09-14 22:26:10 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-09-14 22:26:10 -0700 |
commit | ce4df0b01259dc033c3ec8f855a3978818c3315d (patch) | |
tree | 4bd9fa58584aaae78beb53a9c15c67ff32674112 /fs/cifs/inode.c | |
parent | 151d0cbdbe8609e8489d10ddb7aed6e431fe6b5d (diff) | |
parent | 9e82bf014195d6f0054982c463575cdce24292be (diff) |
Merge 3.17-rc5 into usb-next
We need the USB fixes in there to build on top of in this branch for
3.18.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs/cifs/inode.c')
-rw-r--r-- | fs/cifs/inode.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/fs/cifs/inode.c b/fs/cifs/inode.c index 949ec909ec9a..7899a40465b3 100644 --- a/fs/cifs/inode.c +++ b/fs/cifs/inode.c @@ -1720,7 +1720,10 @@ cifs_rename2(struct inode *source_dir, struct dentry *source_dentry, unlink_target: /* Try unlinking the target dentry if it's not negative */ if (target_dentry->d_inode && (rc == -EACCES || rc == -EEXIST)) { - tmprc = cifs_unlink(target_dir, target_dentry); + if (d_is_dir(target_dentry)) + tmprc = cifs_rmdir(target_dir, target_dentry); + else + tmprc = cifs_unlink(target_dir, target_dentry); if (tmprc) goto cifs_rename_exit; rc = cifs_do_rename(xid, source_dentry, from_name, |