Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

fs: drop unused posix acl handlers

Remove struct posix_acl_{access,default}_handler for all filesystems
that don't depend on the xattr handler in their inode->i_op->listxattr()
method in any way. There's nothing more to do than to simply remove the
handler. It's been effectively unused ever since we introduced the new
posix acl api.

Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Christian Brauner (Microsoft) <brauner@kernel.org>

-80
-4
fs/9p/xattr.c
··· 183 183 const struct xattr_handler *v9fs_xattr_handlers[] = { 184 184 &v9fs_xattr_user_handler, 185 185 &v9fs_xattr_trusted_handler, 186 - #ifdef CONFIG_FS_POSIX_ACL 187 - &posix_acl_access_xattr_handler, 188 - &posix_acl_default_xattr_handler, 189 - #endif 190 186 #ifdef CONFIG_9P_FS_SECURITY 191 187 &v9fs_xattr_security_handler, 192 188 #endif
-4
fs/btrfs/xattr.c
··· 444 444 445 445 const struct xattr_handler *btrfs_xattr_handlers[] = { 446 446 &btrfs_security_xattr_handler, 447 - #ifdef CONFIG_BTRFS_FS_POSIX_ACL 448 - &posix_acl_access_xattr_handler, 449 - &posix_acl_default_xattr_handler, 450 - #endif 451 447 &btrfs_trusted_xattr_handler, 452 448 &btrfs_user_xattr_handler, 453 449 &btrfs_btrfs_xattr_handler,
-4
fs/ceph/xattr.c
··· 1411 1411 * attributes are handled directly. 1412 1412 */ 1413 1413 const struct xattr_handler *ceph_xattr_handlers[] = { 1414 - #ifdef CONFIG_CEPH_FS_POSIX_ACL 1415 - &posix_acl_access_xattr_handler, 1416 - &posix_acl_default_xattr_handler, 1417 - #endif 1418 1414 &ceph_other_xattr_handler, 1419 1415 NULL, 1420 1416 };
-4
fs/cifs/xattr.c
··· 487 487 &smb3_ntsd_xattr_handler, /* alias for above since avoiding "cifs" */ 488 488 &cifs_cifs_ntsd_full_xattr_handler, 489 489 &smb3_ntsd_full_xattr_handler, /* alias for above since avoiding "cifs" */ 490 - #ifdef CONFIG_FS_POSIX_ACL 491 - &posix_acl_access_xattr_handler, 492 - &posix_acl_default_xattr_handler, 493 - #endif 494 490 NULL 495 491 };
-4
fs/ecryptfs/inode.c
··· 1210 1210 }; 1211 1211 1212 1212 const struct xattr_handler *ecryptfs_xattr_handlers[] = { 1213 - #ifdef CONFIG_FS_POSIX_ACL 1214 - &posix_acl_access_xattr_handler, 1215 - &posix_acl_default_xattr_handler, 1216 - #endif 1217 1213 &ecryptfs_xattr_handler, 1218 1214 NULL 1219 1215 };
-4
fs/erofs/xattr.c
··· 463 463 464 464 const struct xattr_handler *erofs_xattr_handlers[] = { 465 465 &erofs_xattr_user_handler, 466 - #ifdef CONFIG_EROFS_FS_POSIX_ACL 467 - &posix_acl_access_xattr_handler, 468 - &posix_acl_default_xattr_handler, 469 - #endif 470 466 &erofs_xattr_trusted_handler, 471 467 #ifdef CONFIG_EROFS_FS_SECURITY 472 468 &erofs_xattr_security_handler,
-4
fs/ext2/xattr.c
··· 113 113 const struct xattr_handler *ext2_xattr_handlers[] = { 114 114 &ext2_xattr_user_handler, 115 115 &ext2_xattr_trusted_handler, 116 - #ifdef CONFIG_EXT2_FS_POSIX_ACL 117 - &posix_acl_access_xattr_handler, 118 - &posix_acl_default_xattr_handler, 119 - #endif 120 116 #ifdef CONFIG_EXT2_FS_SECURITY 121 117 &ext2_xattr_security_handler, 122 118 #endif
-4
fs/ext4/xattr.c
··· 101 101 const struct xattr_handler *ext4_xattr_handlers[] = { 102 102 &ext4_xattr_user_handler, 103 103 &ext4_xattr_trusted_handler, 104 - #ifdef CONFIG_EXT4_FS_POSIX_ACL 105 - &posix_acl_access_xattr_handler, 106 - &posix_acl_default_xattr_handler, 107 - #endif 108 104 #ifdef CONFIG_EXT4_FS_SECURITY 109 105 &ext4_xattr_security_handler, 110 106 #endif
-4
fs/f2fs/xattr.c
··· 204 204 205 205 const struct xattr_handler *f2fs_xattr_handlers[] = { 206 206 &f2fs_xattr_user_handler, 207 - #ifdef CONFIG_F2FS_FS_POSIX_ACL 208 - &posix_acl_access_xattr_handler, 209 - &posix_acl_default_xattr_handler, 210 - #endif 211 207 &f2fs_xattr_trusted_handler, 212 208 #ifdef CONFIG_F2FS_FS_SECURITY 213 209 &f2fs_xattr_security_handler,
-2
fs/gfs2/xattr.c
··· 1501 1501 /* GFS2_FS_FORMAT_MIN */ 1502 1502 &gfs2_xattr_user_handler, 1503 1503 &gfs2_xattr_security_handler, 1504 - &posix_acl_access_xattr_handler, 1505 - &posix_acl_default_xattr_handler, 1506 1504 NULL, 1507 1505 }; 1508 1506
-4
fs/jffs2/xattr.c
··· 920 920 #ifdef CONFIG_JFFS2_FS_SECURITY 921 921 &jffs2_security_xattr_handler, 922 922 #endif 923 - #ifdef CONFIG_JFFS2_FS_POSIX_ACL 924 - &posix_acl_access_xattr_handler, 925 - &posix_acl_default_xattr_handler, 926 - #endif 927 923 &jffs2_trusted_xattr_handler, 928 924 NULL 929 925 };
-4
fs/jfs/xattr.c
··· 986 986 }; 987 987 988 988 const struct xattr_handler *jfs_xattr_handlers[] = { 989 - #ifdef CONFIG_JFS_POSIX_ACL 990 - &posix_acl_access_xattr_handler, 991 - &posix_acl_default_xattr_handler, 992 - #endif 993 989 &jfs_os2_xattr_handler, 994 990 &jfs_user_xattr_handler, 995 991 &jfs_security_xattr_handler,
-1
fs/nfs/nfs3_fs.h
··· 17 17 extern int nfs3_proc_setacls(struct inode *inode, struct posix_acl *acl, 18 18 struct posix_acl *dfacl); 19 19 extern ssize_t nfs3_listxattr(struct dentry *, char *, size_t); 20 - extern const struct xattr_handler *nfs3_xattr_handlers[]; 21 20 #else 22 21 static inline int nfs3_proc_setacls(struct inode *inode, struct posix_acl *acl, 23 22 struct posix_acl *dfacl)
-6
fs/nfs/nfs3acl.c
··· 300 300 goto out; 301 301 } 302 302 303 - const struct xattr_handler *nfs3_xattr_handlers[] = { 304 - &posix_acl_access_xattr_handler, 305 - &posix_acl_default_xattr_handler, 306 - NULL, 307 - }; 308 - 309 303 static int 310 304 nfs3_list_one_acl(struct inode *inode, int type, const char *name, void *data, 311 305 size_t size, ssize_t *result)
-3
fs/nfs/nfs3super.c
··· 14 14 .rpc_vers = &nfs_version3, 15 15 .rpc_ops = &nfs_v3_clientops, 16 16 .sops = &nfs_sops, 17 - #ifdef CONFIG_NFS_V3_ACL 18 - .xattr = nfs3_xattr_handlers, 19 - #endif 20 17 }; 21 18 22 19 static int __init init_nfs_v3(void)
-4
fs/ntfs3/xattr.c
··· 1033 1033 }; 1034 1034 1035 1035 const struct xattr_handler *ntfs_xattr_handlers[] = { 1036 - #ifdef CONFIG_NTFS3_FS_POSIX_ACL 1037 - &posix_acl_access_xattr_handler, 1038 - &posix_acl_default_xattr_handler, 1039 - #endif 1040 1036 &ntfs_other_xattr_handler, 1041 1037 NULL, 1042 1038 };
-2
fs/ocfs2/xattr.c
··· 89 89 90 90 const struct xattr_handler *ocfs2_xattr_handlers[] = { 91 91 &ocfs2_xattr_user_handler, 92 - &posix_acl_access_xattr_handler, 93 - &posix_acl_default_xattr_handler, 94 92 &ocfs2_xattr_trusted_handler, 95 93 &ocfs2_xattr_security_handler, 96 94 NULL
-2
fs/orangefs/xattr.c
··· 555 555 }; 556 556 557 557 const struct xattr_handler *orangefs_xattr_handlers[] = { 558 - &posix_acl_access_xattr_handler, 559 - &posix_acl_default_xattr_handler, 560 558 &orangefs_xattr_default_handler, 561 559 NULL 562 560 };
-8
fs/overlayfs/super.c
··· 1055 1055 }; 1056 1056 1057 1057 static const struct xattr_handler *ovl_trusted_xattr_handlers[] = { 1058 - #ifdef CONFIG_FS_POSIX_ACL 1059 - &posix_acl_access_xattr_handler, 1060 - &posix_acl_default_xattr_handler, 1061 - #endif 1062 1058 &ovl_own_trusted_xattr_handler, 1063 1059 &ovl_other_xattr_handler, 1064 1060 NULL 1065 1061 }; 1066 1062 1067 1063 static const struct xattr_handler *ovl_user_xattr_handlers[] = { 1068 - #ifdef CONFIG_FS_POSIX_ACL 1069 - &posix_acl_access_xattr_handler, 1070 - &posix_acl_default_xattr_handler, 1071 - #endif 1072 1064 &ovl_own_user_xattr_handler, 1073 1065 &ovl_other_xattr_handler, 1074 1066 NULL
-4
fs/xfs/xfs_xattr.c
··· 179 179 &xfs_xattr_user_handler, 180 180 &xfs_xattr_trusted_handler, 181 181 &xfs_xattr_security_handler, 182 - #ifdef CONFIG_XFS_POSIX_ACL 183 - &posix_acl_access_xattr_handler, 184 - &posix_acl_default_xattr_handler, 185 - #endif 186 182 NULL 187 183 }; 188 184
-4
mm/shmem.c
··· 3339 3339 }; 3340 3340 3341 3341 static const struct xattr_handler *shmem_xattr_handlers[] = { 3342 - #ifdef CONFIG_TMPFS_POSIX_ACL 3343 - &posix_acl_access_xattr_handler, 3344 - &posix_acl_default_xattr_handler, 3345 - #endif 3346 3342 &shmem_security_xattr_handler, 3347 3343 &shmem_trusted_xattr_handler, 3348 3344 NULL