]> rtime.felk.cvut.cz Git - linux-imx.git/blobdiff - fs/btrfs/file-item.c
Btrfs: kill root from btrfs_is_free_space_inode
[linux-imx.git] / fs / btrfs / file-item.c
index 5d158d3202331f87675b65f7de0fa7af419b80f2..b45b9de0c21d0f773f19f45ee10ae9803fa36f3a 100644 (file)
@@ -183,7 +183,7 @@ static int __btrfs_lookup_bio_sums(struct btrfs_root *root,
         * read from the commit root and sidestep a nasty deadlock
         * between reading the free space cache and updating the csum tree.
         */
-       if (btrfs_is_free_space_inode(root, inode)) {
+       if (btrfs_is_free_space_inode(inode)) {
                path->search_commit_root = 1;
                path->skip_locking = 1;
        }
@@ -690,6 +690,7 @@ int btrfs_csum_file_blocks(struct btrfs_trans_handle *trans,
                return -ENOMEM;
 
        sector_sum = sums->sums;
+       trans->adding_csums = 1;
 again:
        next_offset = (u64)-1;
        found_next = 0;
@@ -853,6 +854,7 @@ next_sector:
                goto again;
        }
 out:
+       trans->adding_csums = 0;
        btrfs_free_path(path);
        return ret;