mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-30 15:44:13 +08:00
cifs: Fix bug when checking error condition in cifs_rename_pending_delete()
Fix check for error condition after setting attributes with CIFSSMBSetFileInfo(). Signed-off-by: Sachin Prabhu <sprabhu@redhat.com> Reviewed-by: Jeff Layton <jlayton@redhat.com> Reviewed-by: Pavel Shilovsky <piastry@etersoft.ru> Signed-off-by: Steve French <sfrench@us.ibm.com>
This commit is contained in:
parent
9f225788cc
commit
72d282dc51
@ -1023,7 +1023,7 @@ cifs_rename_pending_delete(const char *full_path, struct dentry *dentry,
|
|||||||
current->tgid);
|
current->tgid);
|
||||||
/* although we would like to mark the file hidden
|
/* although we would like to mark the file hidden
|
||||||
if that fails we will still try to rename it */
|
if that fails we will still try to rename it */
|
||||||
if (rc != 0)
|
if (!rc)
|
||||||
cifsInode->cifsAttrs = dosattr;
|
cifsInode->cifsAttrs = dosattr;
|
||||||
else
|
else
|
||||||
dosattr = origattr; /* since not able to change them */
|
dosattr = origattr; /* since not able to change them */
|
||||||
|
Loading…
Reference in New Issue
Block a user