Skip to content

Commit d7f74e9

Browse files
Marc Dionnedhowells
authored andcommitted
afs: Fix updating of i_size with dv jump from server
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: 3f4aa98 ("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
1 parent 865fdb0 commit d7f74e9

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

fs/afs/inode.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,7 @@ static void afs_apply_status(struct afs_operation *op,
230230
set_bit(AFS_VNODE_ZAP_DATA, &vnode->flags);
231231
}
232232
change_size = true;
233+
data_changed = true;
233234
} else if (vnode->status.type == AFS_FTYPE_DIR) {
234235
/* Expected directory change is handled elsewhere so
235236
* that we can locally edit the directory and save on a

0 commit comments

Comments
 (0)