summaryrefslogtreecommitdiff
path: root/fs/btrfs/inode-item.c
diff options
context:
space:
mode:
authorYan, Zheng <zheng.yan@oracle.com>2009-09-21 15:56:00 -0400
committerChris Mason <chris.mason@oracle.com>2009-09-21 15:56:00 -0400
commit13a8a7c8c47e542b3cdb45bec3f431f96af79361 (patch)
tree473f3cc94b4a93a0a5f6f19b1832ef2e6b7ecf62 /fs/btrfs/inode-item.c
parent1c4850e21df8b441164d910bc611ef46a01d5d75 (diff)
downloadkernel-common-13a8a7c8c47e542b3cdb45bec3f431f96af79361.tar.gz
kernel-common-13a8a7c8c47e542b3cdb45bec3f431f96af79361.tar.bz2
kernel-common-13a8a7c8c47e542b3cdb45bec3f431f96af79361.zip
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>
Diffstat (limited to 'fs/btrfs/inode-item.c')
-rw-r--r--fs/btrfs/inode-item.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/fs/btrfs/inode-item.c b/fs/btrfs/inode-item.c
index 6b627c611808..fc6f4a7f6405 100644
--- a/fs/btrfs/inode-item.c
+++ b/fs/btrfs/inode-item.c
@@ -177,8 +177,6 @@ int btrfs_insert_empty_inode(struct btrfs_trans_handle *trans,
ret = btrfs_insert_empty_item(trans, root, path, &key,
sizeof(struct btrfs_inode_item));
- if (ret == 0 && objectid > root->highest_inode)
- root->highest_inode = objectid;
return ret;
}