Btrfs: fix orphan transaction on the freezed filesystem
[deliverable/linux.git] / fs / btrfs / disk-io.c
index 2c18a4eb4d5a1f68bb7a07bddbc99c8a95084e02..dcaf55695e6f1139f24d5e702b222d62e25d9d41 100644 (file)
@@ -1657,9 +1657,10 @@ static int transaction_kthread(void *arg)
                spin_unlock(&root->fs_info->trans_lock);
 
                /* If the file system is aborted, this will always fail. */
-               trans = btrfs_join_transaction(root);
+               trans = btrfs_attach_transaction(root);
                if (IS_ERR(trans)) {
-                       cannot_commit = true;
+                       if (PTR_ERR(trans) != -ENOENT)
+                               cannot_commit = true;
                        goto sleep;
                }
                if (transid == trans->transid) {
This page took 0.051348 seconds and 5 git commands to generate.