diff options
author | Chris Mason <chris.mason@oracle.com> | 2007-04-02 15:43:21 -0400 |
---|---|---|
committer | David Woodhouse <dwmw2@hera.kernel.org> | 2007-04-02 15:43:21 -0400 |
commit | 2da566edd8ce32ae2952b863ee634bcc2e7d63c1 (patch) | |
tree | 35dbd7064dbb6d60924bc1d80703ee2efc72ad03 /fs/btrfs/file-item.c | |
parent | 7cfcc17e7f2334a0503331264c1340de4e564c85 (diff) |
Btrfs: csum_verify_file_block locking fix
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/file-item.c')
-rw-r--r-- | fs/btrfs/file-item.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/btrfs/file-item.c b/fs/btrfs/file-item.c index e7510ac5559d..2c98b620c594 100644 --- a/fs/btrfs/file-item.c +++ b/fs/btrfs/file-item.c | |||
@@ -110,6 +110,7 @@ int btrfs_csum_verify_file_block(struct btrfs_root *root, | |||
110 | file_key.offset = offset; | 110 | file_key.offset = offset; |
111 | file_key.flags = 0; | 111 | file_key.flags = 0; |
112 | btrfs_set_key_type(&file_key, BTRFS_CSUM_ITEM_KEY); | 112 | btrfs_set_key_type(&file_key, BTRFS_CSUM_ITEM_KEY); |
113 | mutex_lock(&root->fs_info->fs_mutex); | ||
113 | ret = btrfs_search_slot(NULL, root, &file_key, path, 0, 0); | 114 | ret = btrfs_search_slot(NULL, root, &file_key, path, 0, 0); |
114 | if (ret) | 115 | if (ret) |
115 | goto fail; | 116 | goto fail; |
@@ -123,6 +124,7 @@ int btrfs_csum_verify_file_block(struct btrfs_root *root, | |||
123 | fail: | 124 | fail: |
124 | btrfs_release_path(root, path); | 125 | btrfs_release_path(root, path); |
125 | btrfs_free_path(path); | 126 | btrfs_free_path(path); |
127 | mutex_unlock(&root->fs_info->fs_mutex); | ||
126 | return ret; | 128 | return ret; |
127 | } | 129 | } |
128 | 130 | ||