aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/xfs/xfs_fs_subr.c18
-rw-r--r--fs/xfs/xfs_vnodeops.h1
2 files changed, 2 insertions, 17 deletions
diff --git a/fs/xfs/xfs_fs_subr.c b/fs/xfs/xfs_fs_subr.c
index d49de3d70456..33658234dfc5 100644
--- a/fs/xfs/xfs_fs_subr.c
+++ b/fs/xfs/xfs_fs_subr.c
@@ -62,23 +62,9 @@ xfs_flush_pages(
62 last == -1 ? LLONG_MAX : last); 62 last == -1 ? LLONG_MAX : last);
63 if (flags & XBF_ASYNC) 63 if (flags & XBF_ASYNC)
64 return ret; 64 return ret;
65 ret2 = xfs_wait_on_pages(ip, first, last); 65 ret2 = -filemap_fdatawait_range(mapping, first,
66 last == -1 ? XFS_ISIZE(ip) - 1 : last);
66 if (!ret) 67 if (!ret)
67 ret = ret2; 68 ret = ret2;
68 return ret; 69 return ret;
69} 70}
70
71int
72xfs_wait_on_pages(
73 xfs_inode_t *ip,
74 xfs_off_t first,
75 xfs_off_t last)
76{
77 struct address_space *mapping = VFS_I(ip)->i_mapping;
78
79 if (mapping_tagged(mapping, PAGECACHE_TAG_WRITEBACK)) {
80 return -filemap_fdatawait_range(mapping, first,
81 last == -1 ? XFS_ISIZE(ip) - 1 : last);
82 }
83 return 0;
84}
diff --git a/fs/xfs/xfs_vnodeops.h b/fs/xfs/xfs_vnodeops.h
index d48141d6bc3b..c8ad48b61a25 100644
--- a/fs/xfs/xfs_vnodeops.h
+++ b/fs/xfs/xfs_vnodeops.h
@@ -52,7 +52,6 @@ int xfs_flushinval_pages(struct xfs_inode *ip, xfs_off_t first,
52 xfs_off_t last, int fiopt); 52 xfs_off_t last, int fiopt);
53int xfs_flush_pages(struct xfs_inode *ip, xfs_off_t first, 53int xfs_flush_pages(struct xfs_inode *ip, xfs_off_t first,
54 xfs_off_t last, uint64_t flags, int fiopt); 54 xfs_off_t last, uint64_t flags, int fiopt);
55int xfs_wait_on_pages(struct xfs_inode *ip, xfs_off_t first, xfs_off_t last);
56 55
57int xfs_zero_eof(struct xfs_inode *, xfs_off_t, xfs_fsize_t); 56int xfs_zero_eof(struct xfs_inode *, xfs_off_t, xfs_fsize_t);
58int xfs_free_eofblocks(struct xfs_mount *, struct xfs_inode *, bool); 57int xfs_free_eofblocks(struct xfs_mount *, struct xfs_inode *, bool);