On Sat, Jul 09, 2022 at 03:48:53PM -0700, Darrick J. Wong wrote: > From: Darrick J. Wong <djwong@xxxxxxxxxx> > > Modify xfs_ifork_ptr to return a NULL pointer if the caller asks for the > attribute fork but i_forkoff is zero. This eliminates the ambiguity > between i_forkoff and i_af.if_present, which should make it easier to > understand the lifetime of attr forks. > > While we're at it, remove the if_present checks around calls to > xfs_idestroy_fork and xfs_ifork_zap_attr since they can both handle attr > forks that have already been torn down. > > Signed-off-by: Darrick J. Wong <djwong@xxxxxxxxxx> > --- > fs/xfs/libxfs/xfs_attr.c | 2 -- > fs/xfs/libxfs/xfs_attr.h | 2 +- > fs/xfs/libxfs/xfs_bmap.c | 1 - > fs/xfs/libxfs/xfs_inode_buf.c | 1 - > fs/xfs/libxfs/xfs_inode_fork.c | 7 +------ > fs/xfs/libxfs/xfs_inode_fork.h | 1 - > fs/xfs/xfs_attr_inactive.c | 11 ++++------- > fs/xfs/xfs_attr_list.c | 1 - > fs/xfs/xfs_icache.c | 8 +++----- > fs/xfs/xfs_inode.c | 5 ++--- > fs/xfs/xfs_inode.h | 2 +- > 11 files changed, 12 insertions(+), 29 deletions(-) Looks good. Reviewed-by: Dave Chinner <dchinner@xxxxxxxxxx> -- Dave Chinner david@xxxxxxxxxxxxx