From: Sachin Prabhu Date: Tue, 5 Mar 2013 19:25:55 +0000 (+0000) Subject: cifs: Fix bug when checking error condition in cifs_rename_pending_delete() X-Git-Tag: submit/tizen_common/20140905.094502~3348^2~4 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=72d282dc5109e5dc0d963be020604e0cc82f7ed7;p=sdk%2Femulator%2Femulator-kernel.git 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 Reviewed-by: Jeff Layton Reviewed-by: Pavel Shilovsky Signed-off-by: Steve French --- diff --git a/fs/cifs/inode.c b/fs/cifs/inode.c index 83f2606c76d0..e7ae45cd94ef 100644 --- a/fs/cifs/inode.c +++ b/fs/cifs/inode.c @@ -1023,7 +1023,7 @@ cifs_rename_pending_delete(const char *full_path, struct dentry *dentry, current->tgid); /* although we would like to mark the file hidden if that fails we will still try to rename it */ - if (rc != 0) + if (!rc) cifsInode->cifsAttrs = dosattr; else dosattr = origattr; /* since not able to change them */