diff options
author | OGAWA Hirofumi <hirofumi@mail.parknet.co.jp> | 2006-01-08 04:02:09 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-01-08 23:13:46 -0500 |
commit | 83b7c996dc859c7b53f94d46ee5c5929cc0399e2 (patch) | |
tree | ba13936ebf2fe9abfdd53fc801b611db97ba65ff | |
parent | a6bf6b211cdb92c315c24719a522d8b6f3998210 (diff) |
[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>
-rw-r--r-- | fs/fat/dir.c | 4 |
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, | |||
45 | if ((sbi->fat_bits != 32) && (dir->i_ino == MSDOS_ROOT_INO)) | 45 | if ((sbi->fat_bits != 32) && (dir->i_ino == MSDOS_ROOT_INO)) |
46 | return; | 46 | return; |
47 | 47 | ||
48 | bh = sb_getblk(sb, phys); | 48 | bh = sb_find_get_block(sb, phys); |
49 | if (bh && !buffer_uptodate(bh)) { | 49 | if (bh == NULL || !buffer_uptodate(bh)) { |
50 | for (sec = 0; sec < sbi->sec_per_clus; sec++) | 50 | for (sec = 0; sec < sbi->sec_per_clus; sec++) |
51 | sb_breadahead(sb, phys + sec); | 51 | sb_breadahead(sb, phys + sec); |
52 | } | 52 | } |