fs: cifs: Fix atime update check vs mtime
authorDeepa Dinamani <deepa.kernel@gmail.com>
Sat, 30 Nov 2019 05:30:25 +0000 (21:30 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 9 Jan 2020 09:20:05 +0000 (10:20 +0100)
commit52788b4af1b6379541b8d2b3a4e3d20c275cc42a
tree1a462b23ea5dd932622a5661dea1b3874261bf7a
parent42692a61ab19151159b62887136039840b53f923
fs: cifs: Fix atime update check vs mtime

commit 69738cfdfa7032f45d9e7462d24490e61cf163dd upstream.

According to the comment in the code and commit log, some apps
expect atime >= mtime; but the introduced code results in
atime==mtime.  Fix the comparison to guard against atime<mtime.

Fixes: 9b9c5bea0b96 ("cifs: do not return atime less than mtime")
Signed-off-by: Deepa Dinamani <deepa.kernel@gmail.com>
Cc: stfrench@microsoft.com
Cc: linux-cifs@vger.kernel.org
Signed-off-by: Steve French <stfrench@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/cifs/inode.c