David Howells 7b0c76354a 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:13:00 +02:00
..
2022-08-17 14:24:07 +02:00
2021-08-19 09:02:55 +09:00
2023-05-30 13:55:32 +01:00
2023-03-17 08:48:50 +01:00
2022-07-02 16:41:14 +02:00
2023-06-14 11:13:00 +02:00
2023-06-09 10:32:21 +02:00
2021-08-26 22:28:02 +02:00
2022-06-09 10:22:55 +02:00
2021-12-29 12:28:59 +01:00
2023-05-17 11:50:14 +02:00
2021-08-19 09:02:55 +09:00
2023-02-22 12:57:05 +01:00
2022-12-14 11:37:31 +01:00
2023-01-12 11:58:47 +01:00
2022-07-02 16:41:17 +02:00
2022-07-12 16:35:08 +02:00
2021-12-14 10:57:15 +01:00
2021-08-10 17:57:22 +02:00