]> Pileus Git - ~andy/linux/blobdiff - fs/btrfs/transaction.c
Merge branch 'fix' of git://git.kernel.org/pub/scm/linux/kernel/git/ycmiao/pxa-linux-2.6
[~andy/linux] / fs / btrfs / transaction.c
index 56ab1f5ea11bb0cb2917de61fc238548b81d94e6..919172de5c9aa9ce64630f593f74a7942e8292fd 100644 (file)
@@ -800,7 +800,7 @@ static noinline int finish_pending_snapshot(struct btrfs_fs_info *fs_info,
 
        parent_inode = pending->dentry->d_parent->d_inode;
        parent_root = BTRFS_I(parent_inode)->root;
-       trans = btrfs_start_transaction(parent_root, 1);
+       trans = btrfs_join_transaction(parent_root, 1);
 
        /*
         * insert the directory item
@@ -852,11 +852,9 @@ static noinline int create_pending_snapshots(struct btrfs_trans_handle *trans,
 {
        struct btrfs_pending_snapshot *pending;
        struct list_head *head = &trans->transaction->pending_snapshots;
-       struct list_head *cur;
        int ret;
 
-       list_for_each(cur, head) {
-               pending = list_entry(cur, struct btrfs_pending_snapshot, list);
+       list_for_each_entry(pending, head, list) {
                ret = create_pending_snapshot(trans, fs_info, pending);
                BUG_ON(ret);
        }