summaryrefslogtreecommitdiff
path: root/fs/fat/dir.c
diff options
context:
space:
mode:
authorOGAWA Hirofumi <hirofumi@mail.parknet.co.jp>2006-01-08 12:02:09 +0300
committerLinus Torvalds <torvalds@g5.osdl.org>2006-01-09 07:13:46 +0300
commit83b7c996dc859c7b53f94d46ee5c5929cc0399e2 (patch)
treeba13936ebf2fe9abfdd53fc801b611db97ba65ff /fs/fat/dir.c
parenta6bf6b211cdb92c315c24719a522d8b6f3998210 (diff)
downloadlinux-83b7c996dc859c7b53f94d46ee5c5929cc0399e2.tar.xz
[PATCH] fat: use sb_find_get_block() instead of sb_getblk()
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>
Diffstat (limited to 'fs/fat/dir.c')
-rw-r--r--fs/fat/dir.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/fat/dir.c b/fs/fat/dir.c
index ba824964b9bb..b2a26cd226b5 100644
--- a/fs/fat/dir.c
+++ b/fs/fat/dir.c
@@ -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);
}