[<prev] [next>] [day] [month] [year] [list]
Message-Id: <200708250324.l7P3OFDJ027967@imap1.linux-foundation.org>
Date: Fri, 24 Aug 2007 20:24:15 -0700
From: akpm@...ux-foundation.org
To: nate.diller@...il.com, linux-ext4@...r.kernel.org,
mm-commits@...r.kernel.org
Subject: - ext4-use-simple_prepare_write-to-zero-page-data.patch removed from -mm tree
The patch titled
ext4: use simple_prepare_write to zero page data
has been removed from the -mm tree. Its filename was
ext4-use-simple_prepare_write-to-zero-page-data.patch
This patch was dropped because it isn't in the present -mm lineup
------------------------------------------------------
Subject: ext4: use simple_prepare_write to zero page data
From: Nate Diller <nate.diller@...il.com>
It's common for file systems to need to zero data on either side of a
write, if a page is not Uptodate during prepare_write. It just so happens
that simple_prepare_write() in libfs.c does exactly that, so we can avoid
duplication and just call that function to zero page data.
Signed-off-by: Nate Diller <nate.diller@...il.com>
Cc: <linux-ext4@...r.kernel.org>
Signed-off-by: Andrew Morton <akpm@...ux-foundation.org>
---
fs/ext4/writeback.c | 17 +----------------
1 file changed, 1 insertion(+), 16 deletions(-)
diff -puN fs/ext4/writeback.c~ext4-use-simple_prepare_write-to-zero-page-data fs/ext4/writeback.c
--- a/fs/ext4/writeback.c~ext4-use-simple_prepare_write-to-zero-page-data
+++ a/fs/ext4/writeback.c
@@ -829,21 +829,6 @@ int ext4_wb_writepages(struct address_sp
return 0;
}
-static void ext4_wb_clear_page(struct page *page, int from, int to)
-{
- void *kaddr;
-
- if (to < PAGE_CACHE_SIZE || from > 0) {
- kaddr = kmap_atomic(page, KM_USER0);
- if (PAGE_CACHE_SIZE > to)
- memset(kaddr + to, 0, PAGE_CACHE_SIZE - to);
- if (0 < from)
- memset(kaddr, 0, from);
- flush_dcache_page(page);
- kunmap_atomic(kaddr, KM_USER0);
- }
-}
-
int ext4_wb_prepare_write(struct file *file, struct page *page,
unsigned from, unsigned to)
{
@@ -873,7 +858,7 @@ int ext4_wb_prepare_write(struct file *f
/* this block isn't allocated yet, reserve space */
wb_debug("reserve space for new block\n");
page->private = 1;
- ext4_wb_clear_page(page, from, to);
+ simple_prepare_write(file, page, from, to);
ClearPageMappedToDisk(page);
} else {
/* block is already mapped, so no need to reserve */
_
Patches currently in -mm which might be from nate.diller@...il.com are
reiser4.patch
-
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists