Btrfs: do not reuse objectid of deleted snapshot/subvol
The new back reference format does not allow reusing objectid of deleted snapshot/subvol. So we use ++highest_objectid to allocate objectid for new snapshot/subvol. Now we use ++highest_objectid to allocate objectid for both new inode and new snapshot/subvolume, so this patch removes 'find hole' code in btrfs_find_free_objectid. Signed-off-by: Yan Zheng <zheng.yan@oracle.com> Signed-off-by: Chris Mason <chris.mason@oracle.com>
This commit is contained in:
@@ -3624,9 +3624,6 @@ static struct inode *btrfs_new_inode(struct btrfs_trans_handle *trans,
|
||||
if (ret != 0)
|
||||
goto fail;
|
||||
|
||||
if (objectid > root->highest_inode)
|
||||
root->highest_inode = objectid;
|
||||
|
||||
inode->i_uid = current_fsuid();
|
||||
|
||||
if (dir && (dir->i_mode & S_ISGID)) {
|
||||
|
Reference in New Issue
Block a user