summaryrefslogtreecommitdiffstats
path: root/fs/xfs
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2018-03-13 23:15:32 -0700
committerDarrick J. Wong <darrick.wong@oracle.com>2018-03-15 10:31:38 -0700
commit1d4352de511f4c9b6f4466c8fd4cfc25b14869b7 (patch)
tree366a7d31cb6b2f4d7cf3c717de44841f64bffaa9 /fs/xfs
parentf5c54717bf2b9e052bb69d6ee19fe22e87817079 (diff)
downloadblackbird-op-linux-1d4352de511f4c9b6f4466c8fd4cfc25b14869b7.tar.gz
blackbird-op-linux-1d4352de511f4c9b6f4466c8fd4cfc25b14869b7.zip
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>
Diffstat (limited to 'fs/xfs')
-rw-r--r--fs/xfs/xfs_aops.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/fs/xfs/xfs_aops.c b/fs/xfs/xfs_aops.c
index c79a3ca20ef8..19eadc807056 100644
--- a/fs/xfs/xfs_aops.c
+++ b/fs/xfs/xfs_aops.c
@@ -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);
OpenPOWER on IntegriCloud