summaryrefslogtreecommitdiffstats
path: root/fs/ocfs2/alloc.c
diff options
context:
space:
mode:
authorDarrick J. Wong <darrick.wong@oracle.com>2016-11-09 23:13:09 +0100
committerDarrick J. Wong <darrick.wong@oracle.com>2016-12-10 21:39:45 +0100
commit84e40080bd6f363ddbcab75b04cb7bc742efbf12 (patch)
treebdbaf3074c1798ff5450ca004823e4e301b45ff8 /fs/ocfs2/alloc.c
parentvfs: refactor clone/dedupe_file_range common functions (diff)
downloadlinux-84e40080bd6f363ddbcab75b04cb7bc742efbf12.tar.xz
linux-84e40080bd6f363ddbcab75b04cb7bc742efbf12.zip
ocfs2: convert inode refcount test to a helper
Replace the open-coded inode refcount flag test with a helper function to reduce the potential for bugs. Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Diffstat (limited to 'fs/ocfs2/alloc.c')
-rw-r--r--fs/ocfs2/alloc.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/ocfs2/alloc.c b/fs/ocfs2/alloc.c
index f72712f6c28d..a0ca49f09880 100644
--- a/fs/ocfs2/alloc.c
+++ b/fs/ocfs2/alloc.c
@@ -5713,8 +5713,7 @@ int ocfs2_remove_btree_range(struct inode *inode,
struct ocfs2_refcount_tree *ref_tree = NULL;
if ((flags & OCFS2_EXT_REFCOUNTED) && len) {
- BUG_ON(!(OCFS2_I(inode)->ip_dyn_features &
- OCFS2_HAS_REFCOUNT_FL));
+ BUG_ON(!ocfs2_is_refcount_inode(inode));
if (!refcount_tree_locked) {
ret = ocfs2_lock_refcount_tree(osb, refcount_loc, 1,