X-Git-Url: http://git.osdn.net/view?a=blobdiff_plain;f=fs%2Fbtrfs%2Finode-map.c;h=07573dc1614abfcce4e290850bf80149c2e5cf17;hb=f43cae2c898c63ef5c5e6b4b049eec352c8a5ad3;hp=767a6056ac45afce29844e469f582baec8ef28cd;hpb=ff6e0fd55ef24e62efe5c9ab8327312164554250;p=sagit-ice-cold%2Fkernel_xiaomi_msm8998.git diff --git a/fs/btrfs/inode-map.c b/fs/btrfs/inode-map.c index 767a6056ac45..07573dc1614a 100644 --- a/fs/btrfs/inode-map.c +++ b/fs/btrfs/inode-map.c @@ -515,7 +515,7 @@ out: return ret; } -static int btrfs_find_highest_objectid(struct btrfs_root *root, u64 *objectid) +int btrfs_find_highest_objectid(struct btrfs_root *root, u64 *objectid) { struct btrfs_path *path; int ret; @@ -555,13 +555,6 @@ int btrfs_find_free_objectid(struct btrfs_root *root, u64 *objectid) int ret; mutex_lock(&root->objectid_mutex); - if (unlikely(root->highest_objectid < BTRFS_FIRST_FREE_OBJECTID)) { - ret = btrfs_find_highest_objectid(root, - &root->highest_objectid); - if (ret) - goto out; - } - if (unlikely(root->highest_objectid >= BTRFS_LAST_FREE_OBJECTID)) { ret = -ENOSPC; goto out;