Skip to content

Commit

Permalink
iomap: return VM_FAULT_* codes from iomap_page_mkwrite
Browse files Browse the repository at this point in the history
All callers will need the VM_FAULT_* flags, so convert in the helper.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Ross Zwisler <ross.zwisler@linux.intel.com>
Reviewed-by: Jan Kara <jack@suse.cz>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
  • Loading branch information
Christoph Hellwig authored and Darrick J. Wong committed Sep 1, 2017
1 parent 2dd3d70 commit e7647fb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
4 changes: 2 additions & 2 deletions fs/iomap.c
Original file line number Diff line number Diff line change
Expand Up @@ -477,10 +477,10 @@ int iomap_page_mkwrite(struct vm_fault *vmf, const struct iomap_ops *ops)

set_page_dirty(page);
wait_for_stable_page(page);
return 0;
return VM_FAULT_LOCKED;
out_unlock:
unlock_page(page);
return ret;
return block_page_mkwrite_return(ret);
}
EXPORT_SYMBOL_GPL(iomap_page_mkwrite);

Expand Down
1 change: 0 additions & 1 deletion fs/xfs/xfs_file.c
Original file line number Diff line number Diff line change
Expand Up @@ -1035,7 +1035,6 @@ xfs_filemap_page_mkwrite(
ret = dax_iomap_fault(vmf, PE_SIZE_PTE, &xfs_iomap_ops);
} else {
ret = iomap_page_mkwrite(vmf, &xfs_iomap_ops);
ret = block_page_mkwrite_return(ret);
}

xfs_iunlock(XFS_I(inode), XFS_MMAPLOCK_SHARED);
Expand Down

0 comments on commit e7647fb

Please sign in to comment.