]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
fs: drop unused posix acl handlers
authorChristian Brauner <brauner@kernel.org>
Wed, 1 Feb 2023 13:14:55 +0000 (14:14 +0100)
committerChristian Brauner (Microsoft) <brauner@kernel.org>
Mon, 6 Mar 2023 08:57:12 +0000 (09:57 +0100)
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>
21 files changed:
fs/9p/xattr.c
fs/btrfs/xattr.c
fs/ceph/xattr.c
fs/cifs/xattr.c
fs/ecryptfs/inode.c
fs/erofs/xattr.c
fs/ext2/xattr.c
fs/ext4/xattr.c
fs/f2fs/xattr.c
fs/gfs2/xattr.c
fs/jffs2/xattr.c
fs/jfs/xattr.c
fs/nfs/nfs3_fs.h
fs/nfs/nfs3acl.c
fs/nfs/nfs3super.c
fs/ntfs3/xattr.c
fs/ocfs2/xattr.c
fs/orangefs/xattr.c
fs/overlayfs/super.c
fs/xfs/xfs_xattr.c
mm/shmem.c

index 50f7f3f6b55e9a7853cc1f6e4d8d14238274379a..a0fcc2ce2e2ebf43794871bf65d4c3032e57a345 100644 (file)
@@ -183,10 +183,6 @@ static struct xattr_handler v9fs_xattr_security_handler = {
 const struct xattr_handler *v9fs_xattr_handlers[] = {
        &v9fs_xattr_user_handler,
        &v9fs_xattr_trusted_handler,
-#ifdef CONFIG_FS_POSIX_ACL
-       &posix_acl_access_xattr_handler,
-       &posix_acl_default_xattr_handler,
-#endif
 #ifdef CONFIG_9P_FS_SECURITY
        &v9fs_xattr_security_handler,
 #endif
index 0ebeaf4e81f9329541f7e6b29457a69923d6e5d2..fc4b20c2688a060b38a9afee1f10d002f2489818 100644 (file)
@@ -444,10 +444,6 @@ static const struct xattr_handler btrfs_btrfs_xattr_handler = {
 
 const struct xattr_handler *btrfs_xattr_handlers[] = {
        &btrfs_security_xattr_handler,
-#ifdef CONFIG_BTRFS_FS_POSIX_ACL
-       &posix_acl_access_xattr_handler,
-       &posix_acl_default_xattr_handler,
-#endif
        &btrfs_trusted_xattr_handler,
        &btrfs_user_xattr_handler,
        &btrfs_btrfs_xattr_handler,
index f65b07cc33a2471d196d7c2e5bb650db822299e0..1fe1b62abebd135befe3ee67b2f1060ed30286f8 100644 (file)
@@ -1411,10 +1411,6 @@ void ceph_release_acl_sec_ctx(struct ceph_acl_sec_ctx *as_ctx)
  * attributes are handled directly.
  */
 const struct xattr_handler *ceph_xattr_handlers[] = {
-#ifdef CONFIG_CEPH_FS_POSIX_ACL
-       &posix_acl_access_xattr_handler,
-       &posix_acl_default_xattr_handler,
-#endif
        &ceph_other_xattr_handler,
        NULL,
 };
index 50e762fa1a148beb53e4c437177ced731c8afd03..4ad5531686d81aa4e9395f58ceb04be13520b5a2 100644 (file)
@@ -487,9 +487,5 @@ const struct xattr_handler *cifs_xattr_handlers[] = {
        &smb3_ntsd_xattr_handler, /* alias for above since avoiding "cifs" */
        &cifs_cifs_ntsd_full_xattr_handler,
        &smb3_ntsd_full_xattr_handler, /* alias for above since avoiding "cifs" */
-#ifdef CONFIG_FS_POSIX_ACL
-       &posix_acl_access_xattr_handler,
-       &posix_acl_default_xattr_handler,
-#endif
        NULL
 };
index 144ace9e0dd9116e928c2b77884b46c7c2adb1ea..83274915ba6dca20e263a868b6a60efb9670323d 100644 (file)
@@ -1210,10 +1210,6 @@ static const struct xattr_handler ecryptfs_xattr_handler = {
 };
 
 const struct xattr_handler *ecryptfs_xattr_handlers[] = {
-#ifdef CONFIG_FS_POSIX_ACL
-       &posix_acl_access_xattr_handler,
-       &posix_acl_default_xattr_handler,
-#endif
        &ecryptfs_xattr_handler,
        NULL
 };
index 60729b1220b6bbdb1a5e3dc01058538689b96545..3de058f1742832f782b37491cca504d167cafb45 100644 (file)
@@ -463,10 +463,6 @@ const struct xattr_handler __maybe_unused erofs_xattr_security_handler = {
 
 const struct xattr_handler *erofs_xattr_handlers[] = {
        &erofs_xattr_user_handler,
-#ifdef CONFIG_EROFS_FS_POSIX_ACL
-       &posix_acl_access_xattr_handler,
-       &posix_acl_default_xattr_handler,
-#endif
        &erofs_xattr_trusted_handler,
 #ifdef CONFIG_EROFS_FS_SECURITY
        &erofs_xattr_security_handler,
index 641abfa4b718a4c0f1b7fc06618f13201a35e36b..262951ffe8d01e81ce4c9d27e991f14dbdbe3e4a 100644 (file)
@@ -113,10 +113,6 @@ static const struct xattr_handler *ext2_xattr_handler_map[] = {
 const struct xattr_handler *ext2_xattr_handlers[] = {
        &ext2_xattr_user_handler,
        &ext2_xattr_trusted_handler,
-#ifdef CONFIG_EXT2_FS_POSIX_ACL
-       &posix_acl_access_xattr_handler,
-       &posix_acl_default_xattr_handler,
-#endif
 #ifdef CONFIG_EXT2_FS_SECURITY
        &ext2_xattr_security_handler,
 #endif
index 62f2ec599218354caf9ea8ef4600cb59a200a0a8..abe659e948b858c44b3cfc3fefdb8c5ed64f1fa4 100644 (file)
@@ -101,10 +101,6 @@ static const struct xattr_handler * const ext4_xattr_handler_map[] = {
 const struct xattr_handler *ext4_xattr_handlers[] = {
        &ext4_xattr_user_handler,
        &ext4_xattr_trusted_handler,
-#ifdef CONFIG_EXT4_FS_POSIX_ACL
-       &posix_acl_access_xattr_handler,
-       &posix_acl_default_xattr_handler,
-#endif
 #ifdef CONFIG_EXT4_FS_SECURITY
        &ext4_xattr_security_handler,
 #endif
index d92edbbdc30e72f1bb1a9fe1e231d009c6d309c2..37cfc03022517eb874ec38a7b2a5267ecdfa3dc1 100644 (file)
@@ -204,10 +204,6 @@ static const struct xattr_handler *f2fs_xattr_handler_map[] = {
 
 const struct xattr_handler *f2fs_xattr_handlers[] = {
        &f2fs_xattr_user_handler,
-#ifdef CONFIG_F2FS_FS_POSIX_ACL
-       &posix_acl_access_xattr_handler,
-       &posix_acl_default_xattr_handler,
-#endif
        &f2fs_xattr_trusted_handler,
 #ifdef CONFIG_F2FS_FS_SECURITY
        &f2fs_xattr_security_handler,
index adf6d17cf03353872b4f74202d5dcc3594bb9326..93b36d026bb478b30b1b438e69313db28e16fa30 100644 (file)
@@ -1501,8 +1501,6 @@ const struct xattr_handler *gfs2_xattr_handlers_max[] = {
        /* GFS2_FS_FORMAT_MIN */
        &gfs2_xattr_user_handler,
        &gfs2_xattr_security_handler,
-       &posix_acl_access_xattr_handler,
-       &posix_acl_default_xattr_handler,
        NULL,
 };
 
index da3e18503c6582074257e2714216bfb24b3a6f32..0eaec4a0f3b18e611604d6c149a4fd2d2e26b9e1 100644 (file)
@@ -919,10 +919,6 @@ const struct xattr_handler *jffs2_xattr_handlers[] = {
        &jffs2_user_xattr_handler,
 #ifdef CONFIG_JFFS2_FS_SECURITY
        &jffs2_security_xattr_handler,
-#endif
-#ifdef CONFIG_JFFS2_FS_POSIX_ACL
-       &posix_acl_access_xattr_handler,
-       &posix_acl_default_xattr_handler,
 #endif
        &jffs2_trusted_xattr_handler,
        NULL
index f817798fa1eb1e28a0608c02de1bda1609bdd8a3..931e50018f888a5c26a05a98e23966031c3ff70b 100644 (file)
@@ -986,10 +986,6 @@ static const struct xattr_handler jfs_trusted_xattr_handler = {
 };
 
 const struct xattr_handler *jfs_xattr_handlers[] = {
-#ifdef CONFIG_JFS_POSIX_ACL
-       &posix_acl_access_xattr_handler,
-       &posix_acl_default_xattr_handler,
-#endif
        &jfs_os2_xattr_handler,
        &jfs_user_xattr_handler,
        &jfs_security_xattr_handler,
index 4fa37dc038b58f1038f0cdeac06823f85976e63e..b333ea119ef54986a0f166536a82c7578c160928 100644 (file)
@@ -17,7 +17,6 @@ extern int nfs3_set_acl(struct mnt_idmap *idmap, struct dentry *dentry,
 extern int nfs3_proc_setacls(struct inode *inode, struct posix_acl *acl,
                struct posix_acl *dfacl);
 extern ssize_t nfs3_listxattr(struct dentry *, char *, size_t);
-extern const struct xattr_handler *nfs3_xattr_handlers[];
 #else
 static inline int nfs3_proc_setacls(struct inode *inode, struct posix_acl *acl,
                struct posix_acl *dfacl)
index 1247f544a440e41303637a252d864eeb97b990fb..349cc4f60a28da8a32169916120c9383bd434363 100644 (file)
@@ -300,12 +300,6 @@ fail:
        goto out;
 }
 
-const struct xattr_handler *nfs3_xattr_handlers[] = {
-       &posix_acl_access_xattr_handler,
-       &posix_acl_default_xattr_handler,
-       NULL,
-};
-
 static int
 nfs3_list_one_acl(struct inode *inode, int type, const char *name, void *data,
                size_t size, ssize_t *result)
index 7c5809431e61b73771ddf047f860272690c0f038..8a9be9e47f7663a8b89b93e13cc4664553fd8ae6 100644 (file)
@@ -14,9 +14,6 @@ struct nfs_subversion nfs_v3 = {
        .rpc_vers = &nfs_version3,
        .rpc_ops  = &nfs_v3_clientops,
        .sops     = &nfs_sops,
-#ifdef CONFIG_NFS_V3_ACL
-       .xattr    = nfs3_xattr_handlers,
-#endif
 };
 
 static int __init init_nfs_v3(void)
index ff64302e87e5846c6b26735f8d096df6403612ed..7324cf92493228795bf7934beb2fc6776f74d82f 100644 (file)
@@ -1033,10 +1033,6 @@ static const struct xattr_handler ntfs_other_xattr_handler = {
 };
 
 const struct xattr_handler *ntfs_xattr_handlers[] = {
-#ifdef CONFIG_NTFS3_FS_POSIX_ACL
-       &posix_acl_access_xattr_handler,
-       &posix_acl_default_xattr_handler,
-#endif
        &ntfs_other_xattr_handler,
        NULL,
 };
index 389308efe854f872648f2fafe08a9666e9e38c97..10dab2a7b2e22dafce40eee426e7fe9021118804 100644 (file)
@@ -89,8 +89,6 @@ static struct ocfs2_xattr_def_value_root def_xv = {
 
 const struct xattr_handler *ocfs2_xattr_handlers[] = {
        &ocfs2_xattr_user_handler,
-       &posix_acl_access_xattr_handler,
-       &posix_acl_default_xattr_handler,
        &ocfs2_xattr_trusted_handler,
        &ocfs2_xattr_security_handler,
        NULL
index 6ecad4f94ae6ef504fb54714c04afdd0a7017782..68b62689a63e248f73881dffc7861e0ff1bc9335 100644 (file)
@@ -555,8 +555,6 @@ static const struct xattr_handler orangefs_xattr_default_handler = {
 };
 
 const struct xattr_handler *orangefs_xattr_handlers[] = {
-       &posix_acl_access_xattr_handler,
-       &posix_acl_default_xattr_handler,
        &orangefs_xattr_default_handler,
        NULL
 };
index f1d9f75f8786ce51ae60723eff63dac5b59c9f7f..f97ad8b40dbbd27fd29e025371ee2b79f1866e69 100644 (file)
@@ -1055,20 +1055,12 @@ static const struct xattr_handler ovl_other_xattr_handler = {
 };
 
 static const struct xattr_handler *ovl_trusted_xattr_handlers[] = {
-#ifdef CONFIG_FS_POSIX_ACL
-       &posix_acl_access_xattr_handler,
-       &posix_acl_default_xattr_handler,
-#endif
        &ovl_own_trusted_xattr_handler,
        &ovl_other_xattr_handler,
        NULL
 };
 
 static const struct xattr_handler *ovl_user_xattr_handlers[] = {
-#ifdef CONFIG_FS_POSIX_ACL
-       &posix_acl_access_xattr_handler,
-       &posix_acl_default_xattr_handler,
-#endif
        &ovl_own_user_xattr_handler,
        &ovl_other_xattr_handler,
        NULL
index 7b9a0ed1b11f74b7870e0e52e4ad2fafad0feaf4..43e5c219aaed568ffb5a711b4583b2cdf1723d9c 100644 (file)
@@ -179,10 +179,6 @@ const struct xattr_handler *xfs_xattr_handlers[] = {
        &xfs_xattr_user_handler,
        &xfs_xattr_trusted_handler,
        &xfs_xattr_security_handler,
-#ifdef CONFIG_XFS_POSIX_ACL
-       &posix_acl_access_xattr_handler,
-       &posix_acl_default_xattr_handler,
-#endif
        NULL
 };
 
index 448f393d8ab2b1bd5f22eec603195977716a8727..b76521ed372dfdfc03117b2773b39f104b9901a6 100644 (file)
@@ -3339,10 +3339,6 @@ static const struct xattr_handler shmem_trusted_xattr_handler = {
 };
 
 static const struct xattr_handler *shmem_xattr_handlers[] = {
-#ifdef CONFIG_TMPFS_POSIX_ACL
-       &posix_acl_access_xattr_handler,
-       &posix_acl_default_xattr_handler,
-#endif
        &shmem_security_xattr_handler,
        &shmem_trusted_xattr_handler,
        NULL