diff options
author | Marc Dionne <marc.dionne@auristor.com> | 2022-12-02 10:07:01 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-05-11 23:17:37 +0900 |
commit | 411c97c124055eddd4bf764390220f597a9dca74 (patch) | |
tree | 8e2102a07917171b649d29788a6890175839a2e1 /fs/afs/inode.c | |
parent | f17d1bc39352d339ffb83887a3fff0740436294e (diff) | |
download | linux-stable-411c97c124055eddd4bf764390220f597a9dca74.tar.gz linux-stable-411c97c124055eddd4bf764390220f597a9dca74.tar.bz2 linux-stable-411c97c124055eddd4bf764390220f597a9dca74.zip |
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: 3f4aa9818163 ("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>
Diffstat (limited to 'fs/afs/inode.c')
-rw-r--r-- | fs/afs/inode.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/afs/inode.c b/fs/afs/inode.c index 0167e96e5198..790cca53c145 100644 --- a/fs/afs/inode.c +++ b/fs/afs/inode.c @@ -230,6 +230,7 @@ static void afs_apply_status(struct afs_operation *op, set_bit(AFS_VNODE_ZAP_DATA, &vnode->flags); } change_size = true; + data_changed = true; } else if (vnode->status.type == AFS_FTYPE_DIR) { /* Expected directory change is handled elsewhere so * that we can locally edit the directory and save on a |