fs: remove the NULL get_block case in mpage_writepages
JIRA: https://issues.redhat.com/browse/RHEL-27740 Tested: by me Conflicts: keep use_writepage=1 in mpage_data commit cf5e7a652168fba45410ac6f5b363fcf8677dea5 Author: Christoph Hellwig <hch@lst.de> Date: Mon Jun 13 07:37:15 2022 +0200 fs: remove the NULL get_block case in mpage_writepages No one calls mpage_writepages with a NULL get_block paramter, so remove support for that case. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Jan Kara <jack@suse.cz> Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org> Signed-off-by: Aristeu Rozanski <arozansk@redhat.com>
This commit is contained in:
parent
8c0ff127d3
commit
5ef28fe342
24
fs/mpage.c
24
fs/mpage.c
|
@ -634,8 +634,6 @@ out:
|
|||
* @mapping: address space structure to write
|
||||
* @wbc: subtract the number of written pages from *@wbc->nr_to_write
|
||||
* @get_block: the filesystem's block mapper function.
|
||||
* If this is NULL then use a_ops->writepage. Otherwise, go
|
||||
* direct-to-BIO.
|
||||
*
|
||||
* This is a library function, which implements the writepages()
|
||||
* address_space_operation.
|
||||
|
@ -652,25 +650,17 @@ int
|
|||
mpage_writepages(struct address_space *mapping,
|
||||
struct writeback_control *wbc, get_block_t get_block)
|
||||
{
|
||||
struct mpage_data mpd = {
|
||||
.get_block = get_block,
|
||||
.use_writepage = 1,
|
||||
};
|
||||
struct blk_plug plug;
|
||||
int ret;
|
||||
|
||||
blk_start_plug(&plug);
|
||||
|
||||
if (!get_block)
|
||||
ret = generic_writepages(mapping, wbc);
|
||||
else {
|
||||
struct mpage_data mpd = {
|
||||
.bio = NULL,
|
||||
.last_block_in_bio = 0,
|
||||
.get_block = get_block,
|
||||
.use_writepage = 1,
|
||||
};
|
||||
|
||||
ret = write_cache_pages(mapping, wbc, __mpage_writepage, &mpd);
|
||||
if (mpd.bio)
|
||||
mpage_bio_submit(mpd.bio);
|
||||
}
|
||||
ret = write_cache_pages(mapping, wbc, __mpage_writepage, &mpd);
|
||||
if (mpd.bio)
|
||||
mpage_bio_submit(mpd.bio);
|
||||
blk_finish_plug(&plug);
|
||||
return ret;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue