diff options
author | Joel Becker <joel.becker@oracle.com> | 2010-07-06 17:36:06 -0400 |
---|---|---|
committer | Joel Becker <joel.becker@oracle.com> | 2010-07-08 16:24:49 -0400 |
commit | a4bfb4cf11fd2211b788af59dc8a8b4394bca227 (patch) | |
tree | c06f45ac5a992575a0e47dbc80bdf187db030cca /fs/ocfs2/aops.c | |
parent | 1739da40543ed2129050ccfa8a076a851ab6ed00 (diff) |
ocfs2: When zero extending, do it by page.
ocfs2_zero_extend() does its zeroing block by block, but it calls a
function named ocfs2_write_zero_page(). Let's have
ocfs2_write_zero_page() handle the page level. From
ocfs2_zero_extend()'s perspective, it is now page-at-a-time.
Signed-off-by: Joel Becker <joel.becker@oracle.com>
Cc: stable@kernel.org
Diffstat (limited to 'fs/ocfs2/aops.c')
-rw-r--r-- | fs/ocfs2/aops.c | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/fs/ocfs2/aops.c b/fs/ocfs2/aops.c index 3623ca20cc18..9a5c931439bd 100644 --- a/fs/ocfs2/aops.c +++ b/fs/ocfs2/aops.c | |||
@@ -459,36 +459,6 @@ int walk_page_buffers( handle_t *handle, | |||
459 | return ret; | 459 | return ret; |
460 | } | 460 | } |
461 | 461 | ||
462 | handle_t *ocfs2_start_walk_page_trans(struct inode *inode, | ||
463 | struct page *page, | ||
464 | unsigned from, | ||
465 | unsigned to) | ||
466 | { | ||
467 | struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); | ||
468 | handle_t *handle; | ||
469 | int ret = 0; | ||
470 | |||
471 | handle = ocfs2_start_trans(osb, OCFS2_INODE_UPDATE_CREDITS); | ||
472 | if (IS_ERR(handle)) { | ||
473 | ret = -ENOMEM; | ||
474 | mlog_errno(ret); | ||
475 | goto out; | ||
476 | } | ||
477 | |||
478 | if (ocfs2_should_order_data(inode)) { | ||
479 | ret = ocfs2_jbd2_file_inode(handle, inode); | ||
480 | if (ret < 0) | ||
481 | mlog_errno(ret); | ||
482 | } | ||
483 | out: | ||
484 | if (ret) { | ||
485 | if (!IS_ERR(handle)) | ||
486 | ocfs2_commit_trans(osb, handle); | ||
487 | handle = ERR_PTR(ret); | ||
488 | } | ||
489 | return handle; | ||
490 | } | ||
491 | |||
492 | static sector_t ocfs2_bmap(struct address_space *mapping, sector_t block) | 462 | static sector_t ocfs2_bmap(struct address_space *mapping, sector_t block) |
493 | { | 463 | { |
494 | sector_t status; | 464 | sector_t status; |