diff options
author | 2007-04-03 11:43:19 -0400 | |
---|---|---|
committer | 2007-04-03 11:43:19 -0400 | |
commit | 9d64272cd3be2aae71f89f7ababbee90a7587b33 (patch) | |
tree | 1b610106cefd177ef8e76e55e4d054c729255832 | |
parent | Btrfs: csum_verify_file_block locking fix (diff) | |
download | linux-dev-9d64272cd3be2aae71f89f7ababbee90a7587b33.tar.xz linux-dev-9d64272cd3be2aae71f89f7ababbee90a7587b33.zip |
Btrfs: don't wait on uptodate buffers on read
Signed-off-by: Chris Mason <chris.mason@oracle.com>
-rw-r--r-- | fs/btrfs/disk-io.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c index 39b117a57a54..055cd45e802e 100644 --- a/fs/btrfs/disk-io.c +++ b/fs/btrfs/disk-io.c @@ -214,6 +214,8 @@ struct buffer_head *read_tree_block(struct btrfs_root *root, u64 blocknr) bh = btrfs_find_create_tree_block(root, blocknr); if (!bh) return bh; + if (buffer_uptodate(bh)) + goto uptodate; lock_buffer(bh); if (!buffer_uptodate(bh)) { get_bh(bh); @@ -226,6 +228,7 @@ struct buffer_head *read_tree_block(struct btrfs_root *root, u64 blocknr) } else { unlock_buffer(bh); } +uptodate: if (check_tree_block(root, bh)) BUG(); return bh; |