diff options
author | Nikolay Borisov <nborisov@suse.com> | 2018-03-27 10:19:23 +0300 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2018-06-07 16:37:33 +0200 |
commit | 30c72595eafa4cf6c57111a9ae2783d210104cc3 (patch) | |
tree | 78e54b3b9bfa2e2ccfabfdd67d715b48d8dde626 /check | |
parent | e889fd7c1172ab5ef304dbbf5b003c0331e6ac9d (diff) |
btrfs-progs: check: Drop ext_ref parameter from find_inode_ref
This is a boolean parameter which signals whether the fs has the
EXTENDED_IREF feature flag toggled or not. Since a reference to fs_info
can be obtained there is no need to pollute the interface.
Signed-off-by: Nikolay Borisov <nborisov@suse.com>
Reviewed-by: Su Yue <suy.fnst@cn.fujitsu.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'check')
-rw-r--r-- | check/mode-lowmem.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/check/mode-lowmem.c b/check/mode-lowmem.c index 510bcb26..86a6eb95 100644 --- a/check/mode-lowmem.c +++ b/check/mode-lowmem.c @@ -1265,14 +1265,13 @@ next: * @namelen: the length of name in the INODE_REF/INODE_EXTREF * @index_ret: the index in the INODE_REF/INODE_EXTREF, * value (64)-1 means do not check index - * @ext_ref: the EXTENDED_IREF feature * * Return 0 if no error occurred. * Return >0 for error bitmap */ static int find_inode_ref(struct btrfs_root *root, struct btrfs_key *key, - char *name, int namelen, u64 *index_ret, - unsigned int ext_ref) + char *name, int namelen, u64 *index_ret) + { struct btrfs_path path; struct btrfs_inode_ref *ref; @@ -1345,8 +1344,9 @@ next_ref: } extref: + /* Skip if not support EXTENDED_IREF feature */ - if (!ext_ref) + if (!btrfs_fs_incompat(root->fs_info, EXTENDED_IREF)) goto out; btrfs_release_path(&path); @@ -1656,8 +1656,7 @@ begin: key.objectid = location.objectid; key.type = BTRFS_INODE_REF_KEY; key.offset = di_key->objectid; - tmp_err |= find_inode_ref(root, &key, namebuf, len, - &index, ext_ref); + tmp_err |= find_inode_ref(root, &key, namebuf, len, &index); /* check relative INDEX/ITEM */ key.objectid = di_key->objectid; @@ -4638,7 +4637,7 @@ static int check_fs_first_inode(struct btrfs_root *root, unsigned int ext_ref) /* special index value */ index = 0; - ret = find_inode_ref(root, &key, "..", strlen(".."), &index, ext_ref); + ret = find_inode_ref(root, &key, "..", strlen(".."), &index); if (ret < 0) goto out; err |= ret; |