aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ext3/inode.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/ext3/inode.c')
-rw-r--r--fs/ext3/inode.c46
1 files changed, 0 insertions, 46 deletions
diff --git a/fs/ext3/inode.c b/fs/ext3/inode.c
index ea5888688f94..0d5fa73b18dc 100644
--- a/fs/ext3/inode.c
+++ b/fs/ext3/inode.c
@@ -844,12 +844,6 @@ get_block:
844 return ret; 844 return ret;
845} 845}
846 846
847static int ext3_writepages_get_block(struct inode *inode, sector_t iblock,
848 struct buffer_head *bh, int create)
849{
850 return ext3_direct_io_get_blocks(inode, iblock, 1, bh, create);
851}
852
853/* 847/*
854 * `handle' can be NULL if create is zero 848 * `handle' can be NULL if create is zero
855 */ 849 */
@@ -1323,45 +1317,6 @@ out_fail:
1323 return ret; 1317 return ret;
1324} 1318}
1325 1319
1326static int
1327ext3_writeback_writepage_helper(struct page *page,
1328 struct writeback_control *wbc)
1329{
1330 return block_write_full_page(page, ext3_get_block, wbc);
1331}
1332
1333static int
1334ext3_writeback_writepages(struct address_space *mapping,
1335 struct writeback_control *wbc)
1336{
1337 struct inode *inode = mapping->host;
1338 handle_t *handle = NULL;
1339 int err, ret = 0;
1340
1341 if (!mapping_tagged(mapping, PAGECACHE_TAG_DIRTY))
1342 return ret;
1343
1344 handle = ext3_journal_start(inode, ext3_writepage_trans_blocks(inode));
1345 if (IS_ERR(handle)) {
1346 ret = PTR_ERR(handle);
1347 return ret;
1348 }
1349
1350 ret = __mpage_writepages(mapping, wbc, ext3_writepages_get_block,
1351 ext3_writeback_writepage_helper);
1352
1353 /*
1354 * Need to reaquire the handle since ext3_writepages_get_block()
1355 * can restart the handle
1356 */
1357 handle = journal_current_handle();
1358
1359 err = ext3_journal_stop(handle);
1360 if (!ret)
1361 ret = err;
1362 return ret;
1363}
1364
1365static int ext3_writeback_writepage(struct page *page, 1320static int ext3_writeback_writepage(struct page *page,
1366 struct writeback_control *wbc) 1321 struct writeback_control *wbc)
1367{ 1322{
@@ -1599,7 +1554,6 @@ static struct address_space_operations ext3_writeback_aops = {
1599 .readpage = ext3_readpage, 1554 .readpage = ext3_readpage,
1600 .readpages = ext3_readpages, 1555 .readpages = ext3_readpages,
1601 .writepage = ext3_writeback_writepage, 1556 .writepage = ext3_writeback_writepage,
1602 .writepages = ext3_writeback_writepages,
1603 .sync_page = block_sync_page, 1557 .sync_page = block_sync_page,
1604 .prepare_write = ext3_prepare_write, 1558 .prepare_write = ext3_prepare_write,
1605 .commit_write = ext3_writeback_commit_write, 1559 .commit_write = ext3_writeback_commit_write,