]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
client/fuse: handle case of renameat2 with non-zero flags 54733/head
authorShachar Sharon <ssharon@redhat.com>
Thu, 30 Nov 2023 11:29:30 +0000 (13:29 +0200)
committerShachar Sharon <ssharon@redhat.com>
Thu, 7 Dec 2023 06:29:50 +0000 (08:29 +0200)
commit19509ce650367de8dfb979d3c6a40d5752c822f2
tree4f3849b74dc64b9ec9808c7090756c6daf4058c5
parentcc1951a5d6d7a11185fc095b6ccd094f3b1273eb
client/fuse: handle case of renameat2 with non-zero flags

When user issues renameat(2) with non-zero flags (RENAME_EXCHANGE or
RENAME_NOREPALCE) the current code ignores those flags and treat the
call as ordinary rename. This, in turn, may yield successful rename with
wrong semantics then those expected by the caller.

Follow the same semantics as kernel's cephfs client: return -EINVAL when
having non-zero flags to renameat2 (see 'ceph_rename' at fs/ceph/dir.c).

Fixes: https://tracker.ceph.com/issues/63722
Signed-off-by: Shachar Sharon <ssharon@redhat.com>
src/client/fuse_ll.cc