aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2020-06-11 21:50:24 +0100
committerLinus Torvalds <torvalds@linux-foundation.org>2020-06-11 16:04:30 -0700
commitb3597945c8a78bd1c4ad7e7ed4f972fdf78650f1 (patch)
treed43cbd13d61a0855ff47b701f7bf8d7160bf4489
parent6a45a65888393eda692fce0851c40d9f5ce4ef66 (diff)
downloadcryptodev-2.6-b3597945c8a78bd1c4ad7e7ed4f972fdf78650f1.tar.gz
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: e49c7b2f6de7 ("afs: Build an abstraction around an "operation" concept") Reported-by: Dave Botsch <botsch@cnf.cornell.edu> Signed-off-by: David Howells <dhowells@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r--fs/afs/write.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/afs/write.c b/fs/afs/write.c
index 97bccde3298be..768497f82aee7 100644
--- a/fs/afs/write.c
+++ b/fs/afs/write.c
@@ -447,6 +447,7 @@ static int afs_store_data(struct address_space *mapping,
op->store.last = last;
op->store.first_offset = offset;
op->store.last_to = to;
+ op->mtime = vnode->vfs_inode.i_mtime;
op->ops = &afs_store_data_operation;
try_next_key: