afs: Add support for RENAME_NOREPLACE and RENAME_EXCHANGE
authorDavid Howells <dhowells@redhat.com>
Wed, 24 Sep 2025 12:49:49 +0000 (13:49 +0100)
committerChristian Brauner <brauner@kernel.org>
Thu, 25 Sep 2025 07:19:07 +0000 (09:19 +0200)
commita19239ba14525c26ad097d59fd52cd9198b5bcdb
tree020a9a521c2c8410f2ffc65d9e76add8dad8b47c
parent8f5ae30d69d7543eee0d70083daf4de8fe15d585
afs: Add support for RENAME_NOREPLACE and RENAME_EXCHANGE

Add support for RENAME_NOREPLACE and RENAME_EXCHANGE, if the server
supports them.

The default is translated to YFS.Rename_Replace, falling back to
YFS.Rename; RENAME_NOREPLACE is translated to YFS.Rename_NoReplace and
RENAME_EXCHANGE to YFS.Rename_Exchange, both of which fall back to
reporting EINVAL.

Signed-off-by: David Howells <dhowells@redhat.com>
Link: https://lore.kernel.org/740476.1758718189@warthog.procyon.org.uk
cc: Marc Dionne <marc.dionne@auristor.com>
cc: Dan Carpenter <dan.carpenter@linaro.org>
cc: linux-afs@lists.infradead.org
Signed-off-by: Christian Brauner <brauner@kernel.org>
fs/afs/dir.c
fs/afs/dir_edit.c
fs/afs/dir_silly.c
fs/afs/internal.h
fs/afs/misc.c
fs/afs/protocol_yfs.h
fs/afs/rotate.c
fs/afs/yfsclient.c
fs/dcache.c
include/trace/events/afs.h