提交 83b7c996 编写于 作者: O OGAWA Hirofumi 提交者: Linus Torvalds

[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: NOGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Signed-off-by: NAndrew Morton <akpm@osdl.org>
Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
上级 a6bf6b21
...@@ -45,8 +45,8 @@ static inline void fat_dir_readahead(struct inode *dir, sector_t iblock, ...@@ -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)) if ((sbi->fat_bits != 32) && (dir->i_ino == MSDOS_ROOT_INO))
return; return;
bh = sb_getblk(sb, phys); bh = sb_find_get_block(sb, phys);
if (bh && !buffer_uptodate(bh)) { if (bh == NULL || !buffer_uptodate(bh)) {
for (sec = 0; sec < sbi->sec_per_clus; sec++) for (sec = 0; sec < sbi->sec_per_clus; sec++)
sb_breadahead(sb, phys + sec); sb_breadahead(sb, phys + sec);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册