Skip to content

Commit

Permalink
xfs: Convert sync_page_range() to simple filemap_write_and_wait_range()
Browse files Browse the repository at this point in the history
Christoph Hellwig says that it is enough for XFS to call
filemap_write_and_wait_range() instead of sync_page_range() because we do
all the metadata syncing when forcing the log.

CC: Felix Blyakher <[email protected]>
CC: [email protected]
CC: Christoph Hellwig <[email protected]>
Signed-off-by: Jan Kara <[email protected]>
  • Loading branch information
jankara committed Sep 14, 2009
1 parent d23c937 commit af0f441
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion fs/xfs/linux-2.6/xfs_lrw.c
Original file line number Diff line number Diff line change
Expand Up @@ -817,7 +817,8 @@ xfs_write(
xfs_iunlock(xip, iolock);
if (need_i_mutex)
mutex_unlock(&inode->i_mutex);
error2 = sync_page_range(inode, mapping, pos, ret);
error2 = filemap_write_and_wait_range(mapping, pos,
pos + ret - 1);
if (!error)
error = error2;
if (need_i_mutex)
Expand Down

0 comments on commit af0f441

Please sign in to comment.