[CIFS] update DOS attributes in cifsInode if we successfully changed them
Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>
diff --git a/fs/cifs/inode.c b/fs/cifs/inode.c
index 27e97d4..db091c5 100644
--- a/fs/cifs/inode.c
+++ b/fs/cifs/inode.c
@@ -752,6 +752,9 @@
set_via_filehandle:
rc = CIFSSMBSetFileInfo(xid, pTcon, &info_buf, netfid, netpid);
+ if (!rc)
+ cifsInode->cifsAttrs = dosattr;
+
if (open_file == NULL)
CIFSSMBClose(xid, pTcon, netfid);
else
@@ -902,6 +905,7 @@
if (rc == 0)
drop_nlink(inode);
}
+ cifsInode->cifsAttrs = dosattr;
}
out_reval:
if (inode) {