cifs: invalidate cache when we truncate a file
authorRonnie Sahlberg <lsahlber@redhat.com>
Wed, 23 May 2018 20:54:27 +0000 (06:54 +1000)
committerSteve French <stfrench@microsoft.com>
Wed, 30 May 2018 21:06:18 +0000 (16:06 -0500)
commit57c55cd7c77b81827757fdbe8dda8c3927c52b4e
tree8b8d5fa36f718efe9506d425986197369126c3f1
parente0386e449af3e893cd811c4c932829b981c83817
cifs: invalidate cache when we truncate a file

RHBZ: 1566345

When truncating a file we always do this synchronously to the server.
Thus we need to make sure that the cached inode metadata is
marked as stale so that on next getattr we will refresh the metadata.
In this particular bug we want to ensure that both ctime and mtime
are updated and become visible to the application after a truncate.

Signed-off-by: Ronnie Sahlberg <lsahlber@redhat.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
Reported-by: Xiaoli Feng <xifeng@redhat.com>
fs/cifs/inode.c