David Howells 84c699681a 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:15:16 +02:00
..
2023-05-30 14:03:21 +01:00
2023-06-09 10:34:08 +02:00
2022-09-24 07:00:00 +02:00
2022-10-10 19:45:17 -07:00
2023-05-11 23:03:05 +09:00
2022-09-11 20:26:07 -07:00
2023-02-22 12:59:46 +01:00
2022-09-24 07:00:00 +02:00
2022-08-20 11:34:33 -04:00
2022-10-10 19:45:17 -07:00
2022-10-29 17:49:33 -07:00
2022-10-10 14:21:11 -07:00
2023-05-11 23:03:01 +09:00
2023-01-04 11:29:01 +01:00