From: David Howells Date: Thu, 11 Jun 2020 20:50:24 +0000 (+0100) Subject: afs: Fix afs_store_data() to set mtime in new operation descriptor X-Git-Tag: baikal/mips/sdk5.9~13403 X-Git-Url: https://git.baikalelectronics.ru/sdk/?a=commitdiff_plain;h=c1fadb45e03b6b28e84e2ce3d75e99e8b09d8b03;p=kernel.git 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: 590fdde7416c ("afs: Build an abstraction around an "operation" concept") Reported-by: Dave Botsch Signed-off-by: David Howells Signed-off-by: Linus Torvalds --- 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: