summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/ctree.c
diff options
context:
space:
mode:
authorLiu Hui2008-11-18 17:30:10 +0100
committerChris Mason2008-11-18 17:30:10 +0100
commitb4eec2ca1167bae46295aeb66abd15fd52387845 (patch)
treebad79258bb437341611116d951f7a8711c4473a0 /fs/btrfs/ctree.c
parentBtrfs: prevent loops in the directory tree when creating snapshots (diff)
downloadkernel-qcow2-linux-b4eec2ca1167bae46295aeb66abd15fd52387845.tar.gz
kernel-qcow2-linux-b4eec2ca1167bae46295aeb66abd15fd52387845.tar.xz
kernel-qcow2-linux-b4eec2ca1167bae46295aeb66abd15fd52387845.zip
Btrfs: Some fixes for batching extent insert.
In insert_extents(), when ret==1 and last is not zero, it should check if the current inserted item is the last item in this batching inserts. If so, it should just break from loop. If not, 'cur = insert_list->next' will make no sense because the list is empty now, and 'op' will point to an unexpectable place. There are also some trivial fixs in this patch including one comment typo error and deleting two redundant lines. Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/ctree.c')
-rw-r--r--fs/btrfs/ctree.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/fs/btrfs/ctree.c b/fs/btrfs/ctree.c
index dd1c03aea2df..71ef0a2e2daa 100644
--- a/fs/btrfs/ctree.c
+++ b/fs/btrfs/ctree.c
@@ -3041,7 +3041,6 @@ int btrfs_insert_some_items(struct btrfs_trans_handle *trans,
struct btrfs_item *item;
int ret = 0;
int slot;
- int slot_orig;
int i;
u32 nritems;
u32 total_data = 0;
@@ -3064,7 +3063,6 @@ int btrfs_insert_some_items(struct btrfs_trans_handle *trans,
if (ret < 0)
goto out;
- slot_orig = path->slots[0];
leaf = path->nodes[0];
nritems = btrfs_header_nritems(leaf);