diff options
author | Steve French <stfrench@microsoft.com> | 2021-09-23 19:42:35 +0200 |
---|---|---|
committer | Steve French <stfrench@microsoft.com> | 2021-09-23 23:16:19 +0200 |
commit | 4f22262280ccb5c0a18a42029313938aabfaff12 (patch) | |
tree | cac917a11b06e68fa2a5387fc216ffd413aeb146 /fs/cifs/file.c | |
parent | cifs: Deal with some warnings from W=1 (diff) | |
download | linux-4f22262280ccb5c0a18a42029313938aabfaff12.tar.xz linux-4f22262280ccb5c0a18a42029313938aabfaff12.zip |
cifs: Clear modified attribute bit from inode flags
Clear CIFS_INO_MODIFIED_ATTR bit from inode flags after
updating mtime and ctime
Signed-off-by: Rohith Surabattula <rohiths@microsoft.com>
Reviewed-by: Paulo Alcantara (SUSE) <pc@cjr.nz>
Acked-by: Ronnie Sahlberg <lsahlber@redhat.com>
Cc: stable@vger.kernel.org # 5.13+
Signed-off-by: Steve French <stfrench@microsoft.com>
Diffstat (limited to '')
-rw-r--r-- | fs/cifs/file.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/cifs/file.c b/fs/cifs/file.c index 0ab5bb24b8ca..13f3182cf796 100644 --- a/fs/cifs/file.c +++ b/fs/cifs/file.c @@ -884,7 +884,7 @@ int cifs_close(struct inode *inode, struct file *file) cinode->lease_granted && !test_bit(CIFS_INO_CLOSE_ON_LOCK, &cinode->flags) && dclose) { - if (test_bit(CIFS_INO_MODIFIED_ATTR, &cinode->flags)) { + if (test_and_clear_bit(CIFS_INO_MODIFIED_ATTR, &cinode->flags)) { inode->i_ctime = inode->i_mtime = current_time(inode); cifs_fscache_update_inode_cookie(inode); } |