aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_vnodeops.c
diff options
context:
space:
mode:
authorDave Chinner <dchinner@redhat.com>2012-11-12 06:53:57 -0500
committerBen Myers <bpm@sgi.com>2012-11-14 16:15:08 -0500
commitfb59581404ab7ec5075299065c22cb211a9262a9 (patch)
tree56a9d9a6cf90ee9b6d753de4401b6a2bf8d02e0f /fs/xfs/xfs_vnodeops.c
parent4bc1ea6b8ddd4f2bd78944fbe5a1042ac14b1f5f (diff)
xfs: remove xfs_flushinval_pages
It's just a simple wrapper around VFS functionality, and is actually bugging in that it doesn't remove mappings before invalidating the page cache. Remove it and replace it with the correct VFS functionality. Signed-off-by: Dave Chinner <dchinner@redhat.com> Reviewed-by: Andrew Dahl <adahl@sgi.com> Signed-off-by: Ben Myers <bpm@sgi.com>
Diffstat (limited to 'fs/xfs/xfs_vnodeops.c')
-rw-r--r--fs/xfs/xfs_vnodeops.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/fs/xfs/xfs_vnodeops.c b/fs/xfs/xfs_vnodeops.c
index c00326afa7bf..81c61fd17890 100644
--- a/fs/xfs/xfs_vnodeops.c
+++ b/fs/xfs/xfs_vnodeops.c
@@ -1958,12 +1958,11 @@ xfs_free_file_space(
1958 1958
1959 rounding = max_t(uint, 1 << mp->m_sb.sb_blocklog, PAGE_CACHE_SIZE); 1959 rounding = max_t(uint, 1 << mp->m_sb.sb_blocklog, PAGE_CACHE_SIZE);
1960 ioffset = offset & ~(rounding - 1); 1960 ioffset = offset & ~(rounding - 1);
1961 1961 error = -filemap_write_and_wait_range(VFS_I(ip)->i_mapping,
1962 if (VN_CACHED(VFS_I(ip)) != 0) { 1962 ioffset, -1);
1963 error = xfs_flushinval_pages(ip, ioffset, -1, FI_REMAPF_LOCKED); 1963 if (error)
1964 if (error) 1964 goto out_unlock_iolock;
1965 goto out_unlock_iolock; 1965 truncate_pagecache_range(VFS_I(ip), ioffset, -1);
1966 }
1967 1966
1968 /* 1967 /*
1969 * Need to zero the stuff we're not freeing, on disk. 1968 * Need to zero the stuff we're not freeing, on disk.