2008-08-04 18:27:48

by Manish Katiyar

[permalink] [raw]
Subject: [PATCH] Remove redundant condition from map_buffer_to_page

Currently the only caller to this function is do_mpage_readpage()
which already checks if the buffer is uptodate, so a check inside is
not required.

Signed-off-by:- "Manish Katiyar" <[email protected]>

---
fs/mpage.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/fs/mpage.c b/fs/mpage.c
index dbcc7af..a797de1 100644
--- a/fs/mpage.c
+++ b/fs/mpage.c
@@ -135,8 +135,7 @@ map_buffer_to_page(struct page *page, struct
buffer_head *bh, int page_block)
* don't make any buffers if there is only one buffer on
* the page and the page just needs to be set up to date
*/
- if (inode->i_blkbits == PAGE_CACHE_SHIFT &&
- buffer_uptodate(bh)) {
+ if (inode->i_blkbits == PAGE_CACHE_SHIFT) {
SetPageUptodate(page);
return;
}
--
1.5.4.3



Thanks -
Manish