Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 11883
b: refs/heads/master
c: a3e713b
h: refs/heads/master
i:
  11881: 9a28067
  11879: 14e67cf
v: v3
  • Loading branch information
Andrew Morton authored and Linus Torvalds committed Oct 31, 2005
1 parent 76ae24e commit a522c7f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 727a53bd535fe3bde644ac346db27456ad964083
refs/heads/master: a3e713b5fdd0e54c2e3c8909ccde2a98839e3a52
8 changes: 5 additions & 3 deletions trunk/fs/buffer.c
Original file line number Diff line number Diff line change
Expand Up @@ -1478,8 +1478,10 @@ EXPORT_SYMBOL(__getblk);
void __breadahead(struct block_device *bdev, sector_t block, int size)
{
struct buffer_head *bh = __getblk(bdev, block, size);
ll_rw_block(READA, 1, &bh);
brelse(bh);
if (likely(bh)) {
ll_rw_block(READA, 1, &bh);
brelse(bh);
}
}
EXPORT_SYMBOL(__breadahead);

Expand All @@ -1497,7 +1499,7 @@ __bread(struct block_device *bdev, sector_t block, int size)
{
struct buffer_head *bh = __getblk(bdev, block, size);

if (!buffer_uptodate(bh))
if (likely(bh) && !buffer_uptodate(bh))
bh = __bread_slow(bh);
return bh;
}
Expand Down

0 comments on commit a522c7f

Please sign in to comment.