Skip to content

Commit

Permalink
[PATCH] fat: use sb_find_get_block() instead of sb_getblk()
Browse files Browse the repository at this point in the history
We don't need to allocate buffer for checking the buffer is uptodate.  This
use sb_find_get_block() instead, and if it returns NULL it's not uptodate.

Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
  • Loading branch information
OGAWA Hirofumi authored and Linus Torvalds committed Jan 9, 2006
1 parent a6bf6b2 commit 83b7c99
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions fs/fat/dir.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ static inline void fat_dir_readahead(struct inode *dir, sector_t iblock,
if ((sbi->fat_bits != 32) && (dir->i_ino == MSDOS_ROOT_INO))
return;

bh = sb_getblk(sb, phys);
if (bh && !buffer_uptodate(bh)) {
bh = sb_find_get_block(sb, phys);
if (bh == NULL || !buffer_uptodate(bh)) {
for (sec = 0; sec < sbi->sec_per_clus; sec++)
sb_breadahead(sb, phys + sec);
}
Expand Down

0 comments on commit 83b7c99

Please sign in to comment.