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

xfs: remove the now unused dir ops infrastructure

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>

authored by

Christoph Hellwig and committed by
Darrick J. Wong
957ee13e 59b8b465

-65
-1
fs/xfs/Makefile
··· 27 27 xfs_bmap_btree.o \ 28 28 xfs_btree.o \ 29 29 xfs_da_btree.o \ 30 - xfs_da_format.o \ 31 30 xfs_defer.o \ 32 31 xfs_dir2.o \ 33 32 xfs_dir2_block.o \
-1
fs/xfs/libxfs/xfs_da_btree.h
··· 10 10 struct xfs_inode; 11 11 struct xfs_trans; 12 12 struct zone; 13 - struct xfs_dir_ops; 14 13 15 14 /* 16 15 * Directory/attribute geometry information. There will be one of these for each
-46
fs/xfs/libxfs/xfs_da_format.c
··· 1 - // SPDX-License-Identifier: GPL-2.0 2 - /* 3 - * Copyright (c) 2000,2002,2005 Silicon Graphics, Inc. 4 - * Copyright (c) 2013 Red Hat, Inc. 5 - * All Rights Reserved. 6 - */ 7 - #include "xfs.h" 8 - #include "xfs_fs.h" 9 - #include "xfs_shared.h" 10 - #include "xfs_format.h" 11 - #include "xfs_log_format.h" 12 - #include "xfs_trans_resv.h" 13 - #include "xfs_mount.h" 14 - #include "xfs_inode.h" 15 - #include "xfs_dir2.h" 16 - #include "xfs_dir2_priv.h" 17 - 18 - static const struct xfs_dir_ops xfs_dir2_ops = { 19 - }; 20 - 21 - static const struct xfs_dir_ops xfs_dir2_ftype_ops = { 22 - }; 23 - 24 - static const struct xfs_dir_ops xfs_dir3_ops = { 25 - }; 26 - 27 - /* 28 - * Return the ops structure according to the current config. If we are passed 29 - * an inode, then that overrides the default config we use which is based on 30 - * feature bits. 31 - */ 32 - const struct xfs_dir_ops * 33 - xfs_dir_get_ops( 34 - struct xfs_mount *mp, 35 - struct xfs_inode *dp) 36 - { 37 - if (dp) 38 - return dp->d_ops; 39 - if (mp->m_dir_inode_ops) 40 - return mp->m_dir_inode_ops; 41 - if (xfs_sb_version_hascrc(&mp->m_sb)) 42 - return &xfs_dir3_ops; 43 - if (xfs_sb_version_hasftype(&mp->m_sb)) 44 - return &xfs_dir2_ftype_ops; 45 - return &xfs_dir2_ops; 46 - }
-2
fs/xfs/libxfs/xfs_dir2.c
··· 104 104 ASSERT(mp->m_sb.sb_versionnum & XFS_SB_VERSION_DIRV2BIT); 105 105 ASSERT(xfs_dir2_dirblock_bytes(&mp->m_sb) <= XFS_MAX_BLOCKSIZE); 106 106 107 - mp->m_dir_inode_ops = xfs_dir_get_ops(mp, NULL); 108 - 109 107 mp->m_dir_geo = kmem_zalloc(sizeof(struct xfs_da_geometry), 110 108 KM_MAYFAIL); 111 109 mp->m_attr_geo = kmem_zalloc(sizeof(struct xfs_da_geometry),
-9
fs/xfs/libxfs/xfs_dir2.h
··· 29 29 extern unsigned char xfs_mode_to_ftype(int mode); 30 30 31 31 /* 32 - * directory operations vector for encode/decode routines 33 - */ 34 - struct xfs_dir_ops { 35 - }; 36 - 37 - extern const struct xfs_dir_ops * 38 - xfs_dir_get_ops(struct xfs_mount *mp, struct xfs_inode *dp); 39 - 40 - /* 41 32 * Generic directory interface routines 42 33 */ 43 34 extern void xfs_dir_startup(void);
-3
fs/xfs/xfs_inode.h
··· 37 37 struct xfs_ifork *i_cowfp; /* copy on write extents */ 38 38 struct xfs_ifork i_df; /* data fork */ 39 39 40 - /* operations vectors */ 41 - const struct xfs_dir_ops *d_ops; /* directory ops vector */ 42 - 43 40 /* Transaction and locking information. */ 44 41 struct xfs_inode_log_item *i_itemp; /* logging information */ 45 42 mrlock_t i_lock; /* inode lock */
-1
fs/xfs/xfs_iops.c
··· 1321 1321 lockdep_set_class(&inode->i_rwsem, 1322 1322 &inode->i_sb->s_type->i_mutex_dir_key); 1323 1323 lockdep_set_class(&ip->i_lock.mr_lock, &xfs_dir_ilock_class); 1324 - ip->d_ops = ip->i_mount->m_dir_inode_ops; 1325 1324 } else { 1326 1325 lockdep_set_class(&ip->i_lock.mr_lock, &xfs_nondir_ilock_class); 1327 1326 }
-2
fs/xfs/xfs_mount.h
··· 12 12 struct xfs_nameops; 13 13 struct xfs_ail; 14 14 struct xfs_quotainfo; 15 - struct xfs_dir_ops; 16 15 struct xfs_da_geometry; 17 16 18 17 /* dynamic preallocation free space thresholds, 5% down to 1% */ ··· 155 156 int m_swidth; /* stripe width */ 156 157 uint8_t m_sectbb_log; /* sectlog - BBSHIFT */ 157 158 const struct xfs_nameops *m_dirnameops; /* vector of dir name ops */ 158 - const struct xfs_dir_ops *m_dir_inode_ops; /* vector of dir inode ops */ 159 159 uint m_chsize; /* size of next field */ 160 160 atomic_t m_active_trans; /* number trans frozen */ 161 161 struct xfs_mru_cache *m_filestream; /* per-mount filestream data */