[PATCH 5/7] orangefs: Use filemap_invalidate_pages()

"Matthew Wilcox (Oracle)" <[email protected]>
Newsgroups org.kernel.vger.linux-fsdevel,dev.linux.lists.fuse-devel,org.kernel.vger.linux-block,org.kernel.vger.linux-btrfs,org.kernel.vger.linux-nfs,org.kvack.linux-mm
Message-ID <[email protected]>
This pair of calls simply open-codes Use filemap_invalidate_pages(),
so convert it.

Signed-off-by: Matthew Wilcox (Oracle) <[email protected]>
---
 fs/orangefs/file.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/fs/orangefs/file.c b/fs/orangefs/file.c
index 42591252e239..36e3685f7e89 100644
--- a/fs/orangefs/file.c
+++ b/fs/orangefs/file.c
@@ -306,9 +306,7 @@ int orangefs_revalidate_mapping(struct inode *inode)
 	spin_unlock(&inode->i_lock);
 
 	unmap_mapping_range(mapping, 0, 0, 0);
-	ret = filemap_write_and_wait(mapping);
-	if (!ret)
-		ret = invalidate_inode_pages2(mapping);
+	ret = filemap_invalidate_pages(mapping, 0, OFFSET_MAX);
 
 	orangefs_inode->mapping_time = jiffies +
 	    orangefs_cache_timeout_msecs*HZ/1000;
-- 
2.47.3
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.