Btrfs: Hold csum mutex while reading in sums during readpages

Signed-off-by: Chris Mason <chris.mason@oracle.com>
This commit is contained in:
Chris Mason
2008-08-04 08:35:53 -04:00
parent 2dd3e67b1e
commit 6dab815743
2 changed files with 3 additions and 1 deletions

View File

@@ -376,7 +376,9 @@ int btrfs_submit_bio_hook(struct inode *inode, int rw, struct bio *bio,
if (!(rw & (1 << BIO_RW))) {
if (!btrfs_test_opt(root, NODATASUM) &&
!btrfs_test_flag(inode, NODATASUM)) {
mutex_lock(&BTRFS_I(inode)->csum_mutex);
btrfs_lookup_bio_sums(root, inode, bio);
mutex_unlock(&BTRFS_I(inode)->csum_mutex);
}
goto mapit;
}