aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorChris Mason <chris.mason@oracle.com>2008-09-23 13:14:13 -0400
committerChris Mason <chris.mason@oracle.com>2008-09-25 11:04:07 -0400
commit1c2308f8e7d8491467e0095af2b01500f1b70819 (patch)
tree598504d248cbd8b0b2a5ea90468db6e7076c92cc /fs
parentce3ed71a58094544da1e1dc4723f1f553bb5b2d5 (diff)
downloadkernel_samsung_smdk4412-1c2308f8e7d8491467e0095af2b01500f1b70819.zip
kernel_samsung_smdk4412-1c2308f8e7d8491467e0095af2b01500f1b70819.tar.gz
kernel_samsung_smdk4412-1c2308f8e7d8491467e0095af2b01500f1b70819.tar.bz2
Add check for tree-log roots in btrfs_alloc_reserved_extents
Tree log blocks are only reserved, and should not ever get fully allocated on disk. This check makes sure they stay out of the extent tree. Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs')
-rw-r--r--fs/btrfs/extent-tree.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c
index 813566a..558fbe4 100644
--- a/fs/btrfs/extent-tree.c
+++ b/fs/btrfs/extent-tree.c
@@ -2365,6 +2365,9 @@ int btrfs_alloc_reserved_extent(struct btrfs_trans_handle *trans,
struct btrfs_key *ins)
{
int ret;
+
+ if (root_objectid == BTRFS_TREE_LOG_OBJECTID)
+ return 0;
maybe_lock_mutex(root);
ret = __btrfs_alloc_reserved_extent(trans, root, root_objectid,
ref_generation, owner,