diff options
| author | Dave Airlie <airlied@redhat.com> | 2022-07-13 10:54:56 +1000 |
|---|---|---|
| committer | Dave Airlie <airlied@redhat.com> | 2022-07-13 10:54:56 +1000 |
| commit | e23a5e14aa278858c2e3d81ec34e83aa9a4177c5 (patch) | |
| tree | 8b662fca8f0643d2b7ef0836da91835408075208 /fs/xfs/xfs_xattr.c | |
| parent | 5e4cb0afe21e4e744ed808de1169a62ab35a57f5 (diff) | |
| parent | 32346491ddf24599decca06190ebca03ff9de7f8 (diff) | |
Backmerge tag 'v5.19-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux into drm-next
Backmerge in rc6 so I can merge msm next easier.
Linux 5.19-rc6
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'fs/xfs/xfs_xattr.c')
| -rw-r--r-- | fs/xfs/xfs_xattr.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/fs/xfs/xfs_xattr.c b/fs/xfs/xfs_xattr.c index 35e13e125ec6..c325a28b89a8 100644 --- a/fs/xfs/xfs_xattr.c +++ b/fs/xfs/xfs_xattr.c @@ -68,6 +68,18 @@ xfs_attr_rele_log_assist( xlog_drop_incompat_feat(mp->m_log); } +static inline bool +xfs_attr_want_log_assist( + struct xfs_mount *mp) +{ +#ifdef DEBUG + /* Logged xattrs require a V5 super for log_incompat */ + return xfs_has_crc(mp) && xfs_globals.larp; +#else + return false; +#endif +} + /* * Set or remove an xattr, having grabbed the appropriate logging resources * prior to calling libxfs. @@ -80,11 +92,14 @@ xfs_attr_change( bool use_logging = false; int error; - if (xfs_has_larp(mp)) { + ASSERT(!(args->op_flags & XFS_DA_OP_LOGGED)); + + if (xfs_attr_want_log_assist(mp)) { error = xfs_attr_grab_log_assist(mp); if (error) return error; + args->op_flags |= XFS_DA_OP_LOGGED; use_logging = true; } |