Skip to content

Commit

Permalink
xfs: Fix xfs_swap_extents() after removal of xfs_flushinval_pages()
Browse files Browse the repository at this point in the history
Commit fb59581 removed
xfs_flushinval_pages() and changed its callers to use
filemap_write_and_wait() and  truncate_pagecache_range() directly.

But in xfs_swap_extents() this change accidental switched the argument
for 'tip' to 'ip'. This patch switches it back to 'tip'

Signed-off-by: Torsten Kaiser <just.for.lkml@googlemail.com>
Reviewed-by: Ben Myers <bpm@sgi.com>
Signed-off-by: Ben Myers <bpm@sgi.com>
  • Loading branch information
Torsten Kaiser authored and Ben Myers committed Jan 28, 2013
1 parent 4b05d09 commit 65e3aa7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions fs/xfs/xfs_dfrag.c
Original file line number Diff line number Diff line change
Expand Up @@ -246,10 +246,10 @@ xfs_swap_extents(
goto out_unlock;
}

error = -filemap_write_and_wait(VFS_I(ip)->i_mapping);
error = -filemap_write_and_wait(VFS_I(tip)->i_mapping);
if (error)
goto out_unlock;
truncate_pagecache_range(VFS_I(ip), 0, -1);
truncate_pagecache_range(VFS_I(tip), 0, -1);

/* Verify O_DIRECT for ftmp */
if (VN_CACHED(VFS_I(tip)) != 0) {
Expand Down

0 comments on commit 65e3aa7

Please sign in to comment.