Btrfs: update nodatacow code v2
[linux-2.6-block.git] / fs / btrfs / transaction.c
index 968b84f17a19e9a9fb5ad1f456381fbc682d2f03..e72a013d24bf9596a6d94f1bf91eca8b26bfe10e 100644 (file)
@@ -763,6 +763,8 @@ static noinline int create_pending_snapshot(struct btrfs_trans_handle *trans,
        if (ret)
                goto fail;
 
+       btrfs_record_root_in_trans(root);
+       btrfs_set_root_last_snapshot(&root->root_item, trans->transid);
        memcpy(new_root_item, &root->root_item, sizeof(*new_root_item));
 
        key.objectid = objectid;