summaryrefslogtreecommitdiff
path: root/fs/xfs/xfs_discard.c
diff options
context:
space:
mode:
authorDave Chinner <dchinner@redhat.com>2021-08-18 18:46:52 -0700
committerDarrick J. Wong <djwong@kernel.org>2021-08-19 10:07:12 -0700
commit0560f31a09e523090d1ab2bfe21c69d028c2bdf2 (patch)
tree1f5d7a7dc65bfa3f9d7217b403071c1f68cb1e69 /fs/xfs/xfs_discard.c
parent8970a5b8a46c526a738db2cb89173aa0a2fd02a9 (diff)
xfs: convert mount flags to features
Replace m_flags feature checks with xfs_has_<feature>() calls and rework the setup code to set flags in m_features. Signed-off-by: Dave Chinner <dchinner@redhat.com> Reviewed-by: Darrick J. Wong <djwong@kernel.org> Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Diffstat (limited to 'fs/xfs/xfs_discard.c')
-rw-r--r--fs/xfs/xfs_discard.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/xfs/xfs_discard.c b/fs/xfs/xfs_discard.c
index 736df5660f1f..0191de8ce9ce 100644
--- a/fs/xfs/xfs_discard.c
+++ b/fs/xfs/xfs_discard.c
@@ -169,7 +169,7 @@ xfs_ioc_trim(
* We haven't recovered the log, so we cannot use our bnobt-guided
* storage zapping commands.
*/
- if (mp->m_flags & XFS_MOUNT_NORECOVERY)
+ if (xfs_has_norecovery(mp))
return -EROFS;
if (copy_from_user(&range, urange, sizeof(range)))