mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-03 01:16:40 +07:00
xfs: minor cleanup for xfs_get_blocks
Simplify the control flow a bit in preparation for O_ATOMIC-related changes. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com> Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
This commit is contained in:
parent
f5c54717bf
commit
1d4352de51
@ -1335,17 +1335,16 @@ xfs_get_blocks(
|
||||
&nimaps, 0);
|
||||
if (error)
|
||||
goto out_unlock;
|
||||
|
||||
if (nimaps) {
|
||||
trace_xfs_get_blocks_found(ip, offset, size,
|
||||
imap.br_state == XFS_EXT_UNWRITTEN ?
|
||||
XFS_IO_UNWRITTEN : XFS_IO_OVERWRITE, &imap);
|
||||
xfs_iunlock(ip, lockmode);
|
||||
} else {
|
||||
if (!nimaps) {
|
||||
trace_xfs_get_blocks_notfound(ip, offset, size);
|
||||
goto out_unlock;
|
||||
}
|
||||
|
||||
trace_xfs_get_blocks_found(ip, offset, size,
|
||||
imap.br_state == XFS_EXT_UNWRITTEN ?
|
||||
XFS_IO_UNWRITTEN : XFS_IO_OVERWRITE, &imap);
|
||||
xfs_iunlock(ip, lockmode);
|
||||
|
||||
/* trim mapping down to size requested */
|
||||
xfs_map_trim_size(inode, iblock, bh_result, &imap, offset, size);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user