Commit a1c37005 authored by Marc Dionne's avatar Marc Dionne Committed by sanglipeng
Browse files

afs: Fix updating of i_size with dv jump from server

stable inclusion
from stable-v5.10.180
commit 9aabb5f9ef3214fa1e0bc267dbbc00c534ba2b9b
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I8DDFN

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=9aabb5f9ef3214fa1e0bc267dbbc00c534ba2b9b



--------------------------------

[ Upstream commit d7f74e9a ]

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: 3f4aa981 ("afs: Fix EOF corruption")
Signed-off-by: default avatarMarc Dionne <marc.dionne@auristor.com>
Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
cc: linux-afs@lists.infradead.org
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarsanglipeng <sanglipeng1@jd.com>
parent 5064a860
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment