consolidate generic_writepages and mpage_writepages
authorMiklos Szeredi <mszeredi@suse.cz>
Fri, 11 May 2007 05:22:51 +0000 (22:22 -0700)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Fri, 11 May 2007 15:29:35 +0000 (08:29 -0700)
commit0ea971801625184a91a6d80ea85e53875caa0bf5
tree6f4144b7ba809fccfe6d75314df8c348596c9a01
parente10cc1df1d2014f68a4bdcf73f6dd122c4561f94
consolidate generic_writepages and mpage_writepages

Clean up massive code duplication between mpage_writepages() and
generic_writepages().

The new generic function, write_cache_pages() takes a function pointer
argument, which will be called for each page to be written.

Maybe cifs_writepages() too can use this infrastructure, but I'm not
touching that with a ten-foot pole.

The upcoming page writeback support in fuse will also want this.

Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
Acked-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/mpage.c
include/linux/mpage.h
include/linux/writeback.h
mm/page-writeback.c