]> git.ipfire.org Git - thirdparty/linux.git/commit
fs: cifs: Fix atime update check
authorZizhi Wo <wozizhi@huawei.com>
Wed, 13 Dec 2023 02:23:53 +0000 (10:23 +0800)
committerSteve French <stfrench@microsoft.com>
Tue, 19 Dec 2023 16:33:57 +0000 (10:33 -0600)
commit01fe654f78fd1ea4df046ef76b07ba92a35f8dbe
treeddc34d8210dfadeb2d3158e648028bf4e8971e34
parent567320c46a60a3c39b69aa1df802d753817a3f86
fs: cifs: Fix atime update check

Commit 9b9c5bea0b96 ("cifs: do not return atime less than mtime") indicates
that in cifs, if atime is less than mtime, some apps will break.
Therefore, it introduce a function to compare this two variables in two
places where atime is updated. If atime is less than mtime, update it to
mtime.

However, the patch was handled incorrectly, resulting in atime and mtime
being exactly equal. A previous commit 69738cfdfa70 ("fs: cifs: Fix atime
update check vs mtime") fixed one place and forgot to fix another. Fix it.

Fixes: 9b9c5bea0b96 ("cifs: do not return atime less than mtime")
Cc: stable@vger.kernel.org
Signed-off-by: Zizhi Wo <wozizhi@huawei.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/smb/client/file.c