Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5cf95214 authored by Trond Myklebust's avatar Trond Myklebust
Browse files

NFS: Clean up nfs_sync_mapping



Remove the redundant call to filemap_write_and_wait().

Signed-off-by: default avatarTrond Myklebust <Trond.Myklebust@netapp.com>
parent 7f2f12d9
Loading
Loading
Loading
Loading
+5 −9
Original line number Original line Diff line number Diff line
@@ -114,16 +114,12 @@ void nfs_clear_inode(struct inode *inode)
 */
 */
int nfs_sync_mapping(struct address_space *mapping)
int nfs_sync_mapping(struct address_space *mapping)
{
{
	int ret;
	int ret = 0;


	if (mapping->nrpages == 0)
	if (mapping->nrpages != 0) {
		return 0;
		unmap_mapping_range(mapping, 0, 0, 0);
		unmap_mapping_range(mapping, 0, 0, 0);
	ret = filemap_write_and_wait(mapping);
	if (ret != 0)
		goto out;
		ret = nfs_wb_all(mapping->host);
		ret = nfs_wb_all(mapping->host);
out:
	}
	return ret;
	return ret;
}
}