diff --git a/[refs] b/[refs] index 8ce8eb6fcedc..f8bd5cbe5b27 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 22c9d52bc03b880045ab1081890a38f11b272ae7 +refs/heads/master: fc6f394332ef1bf6ff5fbeaba0f2cd7a3c7971b6 diff --git a/trunk/fs/cifs/inode.c b/trunk/fs/cifs/inode.c index 09082ac85185..f36b4e40e443 100644 --- a/trunk/fs/cifs/inode.c +++ b/trunk/fs/cifs/inode.c @@ -1453,7 +1453,8 @@ int cifs_rename(struct inode *source_dir, struct dentry *source_dentry, checking the UniqueId via FILE_INTERNAL_INFO */ unlink_target: - if ((rc == -EACCES) || (rc == -EEXIST)) { + /* 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 (tmprc) goto cifs_rename_exit;