]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
client: Fix parsing of xattr namespace in removexattr
authorAnoop C S <anoopcs@cryptolab.net>
Mon, 8 Jan 2024 11:45:26 +0000 (17:15 +0530)
committerAnoop C S <anoopcs@cryptolab.net>
Wed, 28 Feb 2024 06:20:50 +0000 (11:50 +0530)
To match the kernel ceph client, as mentioned by the inline comments,
remove the comparison with "system." xattr namespace in removexattr()
code path. This is in preparation to handle the case where POSIX ACL
xattrs are treated differently by kernel during removexattr operation.

ref: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/fs/ceph/xattr.c#n21

Signed-off-by: Anoop C S <anoopcs@cryptolab.net>
(cherry picked from commit 655aedf605e8b5bc99976499ae5bdb8d11aa4a93)

src/client/Client.cc

index 42ca406f84c31e790f38acfa43abd0413004b292..2e099f26e6845bc724f4ba964b14d748ade87a94 100644 (file)
@@ -13310,7 +13310,6 @@ int Client::_removexattr(Inode *in, const char *name, const UserPerm& perms)
 
   // same xattrs supported by kernel client
   if (strncmp(name, "user.", 5) &&
-      strncmp(name, "system.", 7) &&
       strncmp(name, "security.", 9) &&
       strncmp(name, "trusted.", 8) &&
       strncmp(name, "ceph.", 5))