From 3ce2772ef7f9cd65bd2a343aadf027f3a1306bfa Mon Sep 17 00:00:00 2001 From: "Darrick J. Wong" Date: Wed, 22 Jun 2022 14:28:52 -0500 Subject: [PATCH] xfs: move xfs_attr_use_log_assist out of xfs_log.c Source kernel commit: d9c61ccb3b09d8f892cccbf662ce0c870f8e4ade The LARP patchset added an awkward coupling point between libxfs and what would be libxlog, if the XFS log were actually its own library. Move the code that enables logged xattr updates out of "lib"xlog and into xfs_xattr.c so that it no longer has to know about xlog_* functions. While we're at it, give xfs_xattr.c its own header file. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner Signed-off-by: Dave Chinner Signed-off-by: Eric Sandeen --- libxfs/libxfs_priv.h | 4 ++++ libxfs/xfs_attr.c | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/libxfs/libxfs_priv.h b/libxfs/libxfs_priv.h index fcdcfebf6..26fe7eaa1 100644 --- a/libxfs/libxfs_priv.h +++ b/libxfs/libxfs_priv.h @@ -721,4 +721,8 @@ int xfs_bmap_last_extent(struct xfs_trans *tp, struct xfs_inode *ip, /* xfs_inode.h */ #define xfs_iflags_set(ip, flags) do { } while (0) +/* xfs_xattr.c */ +#define xfs_attr_grab_log_assist(mp) (0) +#define xfs_attr_rele_log_assist(mp) ((void) 0) + #endif /* __LIBXFS_INTERNAL_XFS_H__ */ diff --git a/libxfs/xfs_attr.c b/libxfs/xfs_attr.c index 154ec886d..838f2c534 100644 --- a/libxfs/xfs_attr.c +++ b/libxfs/xfs_attr.c @@ -1026,7 +1026,7 @@ xfs_attr_set( } if (use_logging) { - error = xfs_attr_use_log_assist(mp); + error = xfs_attr_grab_log_assist(mp); if (error) return error; } @@ -1100,7 +1100,7 @@ out_unlock: xfs_iunlock(dp, XFS_ILOCK_EXCL); drop_incompat: if (use_logging) - xlog_drop_incompat_feat(mp->m_log); + xfs_attr_rele_log_assist(mp); return error; out_trans_cancel: -- 2.47.3