aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/disk-io.c
diff options
context:
space:
mode:
authorChris Mason <chris.mason@oracle.com>2007-04-03 11:43:19 -0400
committerDavid Woodhouse <dwmw2@hera.kernel.org>2007-04-03 11:43:19 -0400
commit9d64272cd3be2aae71f89f7ababbee90a7587b33 (patch)
tree1b610106cefd177ef8e76e55e4d054c729255832 /fs/btrfs/disk-io.c
parent2da566edd8ce32ae2952b863ee634bcc2e7d63c1 (diff)
Btrfs: don't wait on uptodate buffers on read
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/disk-io.c')
-rw-r--r--fs/btrfs/disk-io.c3
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)
214 bh = btrfs_find_create_tree_block(root, blocknr); 214 bh = btrfs_find_create_tree_block(root, blocknr);
215 if (!bh) 215 if (!bh)
216 return bh; 216 return bh;
217 if (buffer_uptodate(bh))
218 goto uptodate;
217 lock_buffer(bh); 219 lock_buffer(bh);
218 if (!buffer_uptodate(bh)) { 220 if (!buffer_uptodate(bh)) {
219 get_bh(bh); 221 get_bh(bh);
@@ -226,6 +228,7 @@ struct buffer_head *read_tree_block(struct btrfs_root *root, u64 blocknr)
226 } else { 228 } else {
227 unlock_buffer(bh); 229 unlock_buffer(bh);
228 } 230 }
231uptodate:
229 if (check_tree_block(root, bh)) 232 if (check_tree_block(root, bh))
230 BUG(); 233 BUG();
231 return bh; 234 return bh;