David Howells 2d3e4c5b3e afs: Fix setting of mtime when creating a file/dir/symlink
[ Upstream commit a27648c742104a833a01c54becc24429898d85bf ]

kafs incorrectly passes a zero mtime (ie. 1st Jan 1970) to the server when
creating a file, dir or symlink because the mtime recorded in the
afs_operation struct gets passed to the server by the marshalling routines,
but the afs_mkdir(), afs_create() and afs_symlink() functions don't set it.

This gets masked if a file or directory is subsequently modified.

Fix this by filling in op->mtime before calling the create op.

Fixes: e49c7b2f6de7 ("afs: Build an abstraction around an "operation" concept")
Signed-off-by: David Howells <dhowells@redhat.com>
Reviewed-by: Jeffrey Altman <jaltman@auristor.com>
Reviewed-by: Marc Dionne <marc.dionne@auristor.com>
cc: linux-afs@lists.infradead.org
cc: linux-fsdevel@vger.kernel.org
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-06-14 11:09:37 +02:00
..
2020-10-16 11:11:22 -07:00
2023-06-14 11:09:31 +02:00
2021-09-18 13:40:15 +02:00
2023-06-09 10:30:08 +02:00
2023-04-20 12:10:26 +02:00
2023-05-17 11:47:35 +02:00
2023-02-22 12:55:54 +01:00
2022-06-09 10:21:16 +02:00
2023-01-04 11:39:23 +01:00
2023-01-14 10:16:27 +01:00