Btrfs: set journal_info in async trans commit worker
authorSage Weil <sage@inktank.com>
Thu, 30 Aug 2012 22:26:16 +0000 (16:26 -0600)
committerChris Mason <chris.mason@fusionio.com>
Mon, 1 Oct 2012 19:19:08 +0000 (15:19 -0400)
We expect current->journal_info to point to the trans handle we are
committing.

Signed-off-by: Sage Weil <sage@inktank.com>
fs/btrfs/transaction.c

index 730c94590c9f20873a80168cdee54f90998a782c..ffc6b5202d5ccdf3855120d7cd2601ce53487d09 100644 (file)
@@ -1237,6 +1237,8 @@ static void do_async_commit(struct work_struct *work)
                &ac->root->fs_info->sb->s_writers.lock_map[SB_FREEZE_FS-1],
                0, 1, _THIS_IP_);
 
+       current->journal_info = ac->newtrans;
+
        btrfs_commit_transaction(ac->newtrans, ac->root);
        kfree(ac);
 }