summaryrefslogtreecommitdiff
path: root/fs/btrfs/inode-map.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/btrfs/inode-map.c')
-rw-r--r--fs/btrfs/inode-map.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/btrfs/inode-map.c b/fs/btrfs/inode-map.c
index cd6171c2da42..80038c5ef7cf 100644
--- a/fs/btrfs/inode-map.c
+++ b/fs/btrfs/inode-map.c
@@ -117,10 +117,14 @@ int btrfs_find_free_objectid(struct btrfs_trans_handle *trans,
*objectid = last_ino;
goto found;
}
+ } else if (key.objectid > search_start) {
+ *objectid = search_start;
+ goto found;
}
}
if (key.objectid >= BTRFS_LAST_FREE_OBJECTID)
break;
+
start_found = 1;
last_ino = key.objectid + 1;
path->slots[0]++;