Skip to content

Commit b359794

Browse files
dhowellstorvalds
authored andcommitted
afs: Fix afs_store_data() to set mtime in new operation descriptor
Fix afs_store_data() so that it sets the mtime in the new operation descriptor otherwise the mtime on the server gets set to 0 when a write is stored to the server. Fixes: e49c7b2 ("afs: Build an abstraction around an "operation" concept") Reported-by: Dave Botsch <[email protected]> Signed-off-by: David Howells <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
1 parent 6a45a65 commit b359794

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

fs/afs/write.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -447,6 +447,7 @@ static int afs_store_data(struct address_space *mapping,
447447
op->store.last = last;
448448
op->store.first_offset = offset;
449449
op->store.last_to = to;
450+
op->mtime = vnode->vfs_inode.i_mtime;
450451
op->ops = &afs_store_data_operation;
451452

452453
try_next_key:

0 commit comments

Comments
 (0)