]> git.baikalelectronics.ru Git - kernel.git/commit
afs: Fix updating of i_size with dv jump from server
authorMarc Dionne <marc.dionne@auristor.com>
Fri, 2 Dec 2022 14:07:01 +0000 (10:07 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 17 May 2023 09:35:54 +0000 (11:35 +0200)
commit30eb0aaed728ae52e63c6b6fc80b7924607887d4
treef1872c80f47dccca67a57c86be426e4fce9807aa
parent4b7cf628d022177129481a98a67b58dbd862f06f
afs: Fix updating of i_size with dv jump from server

[ Upstream commit d7f74e9a917503ee78f2b603a456d7227cf38919 ]

If the data version returned from the server is larger than expected,
the local data is invalidated, but we may still want to note the remote
file size.

Since we're setting change_size, we have to also set data_changed
for the i_size to get updated.

Fixes: f550e8561d87 ("afs: Fix EOF corruption")
Signed-off-by: Marc Dionne <marc.dionne@auristor.com>
Signed-off-by: David Howells <dhowells@redhat.com>
cc: linux-afs@lists.infradead.org
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/afs/inode.c