From: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
To: Andrew Morton <akpm@osdl.org>
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] fat: use sb_find_get_block() instead of sb_getblk()
Date: Tue, 08 Nov 2005 02:36:25 +0900 [thread overview]
Message-ID: <87d5lctl5y.fsf@devron.myhome.or.jp> (raw)
In-Reply-To: <87hdaotlci.fsf@devron.myhome.or.jp> (OGAWA Hirofumi's message of "Tue, 08 Nov 2005 02:32:29 +0900")
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>
---
fs/fat/dir.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff -puN fs/fat/dir.c~fat_dir_readahead-optimize fs/fat/dir.c
--- linux-2.6.14/fs/fat/dir.c~fat_dir_readahead-optimize 2005-11-07 03:58:44.000000000 +0900
+++ linux-2.6.14-hirofumi/fs/fat/dir.c 2005-11-07 03:58:44.000000000 +0900
@@ -45,8 +45,8 @@ static inline void fat_dir_readahead(str
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);
}
_
next prev parent reply other threads:[~2005-11-07 17:40 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-11-07 17:32 [PATCH 1/6] fat: move fat_clusters_flush() to write_super() OGAWA Hirofumi
2005-11-07 17:36 ` OGAWA Hirofumi [this message]
2005-11-07 17:37 ` [PATCH 3/6] fat: add the read/writepages() OGAWA Hirofumi
2005-11-07 17:39 ` [PATCH 4/6] fat: s/EXPORT_SYMBOL/EXPORT_SYMBOL_GPL/ OGAWA Hirofumi
2005-11-07 17:41 ` [PATCH 5/6] fat: support ->direct_IO() OGAWA Hirofumi
2005-11-07 17:42 ` [PATCH 6/6] export/change sync_page_range/_nolock() OGAWA Hirofumi
2005-11-07 17:46 ` [PATCH 7/6] fat: Support a truncate() for expanding size OGAWA Hirofumi
2005-11-07 17:51 ` OGAWA Hirofumi
2005-11-08 1:06 ` Andrew Morton
2005-11-08 3:19 ` OGAWA Hirofumi
2005-11-08 4:19 ` Andrew Morton
2005-11-08 5:22 ` OGAWA Hirofumi
2005-11-08 20:40 ` OGAWA Hirofumi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87d5lctl5y.fsf@devron.myhome.or.jp \
--to=hirofumi@mail.parknet.co.jp \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox