]> git.baikalelectronics.ru Git - kernel.git/commit
xfs: simplify xfs_file_iomap_begin() logic
authorDave Chinner <dchinner@redhat.com>
Wed, 2 May 2018 19:54:53 +0000 (12:54 -0700)
committerDarrick J. Wong <darrick.wong@oracle.com>
Wed, 9 May 2018 17:04:01 +0000 (10:04 -0700)
commit64623fe1015fa9faff2328e52a4d9ff3e7fb2eea
treede05be7b9370bcad5269ec9265275a34b20144e4
parent811c6a541c98ed46f775e5afcb162d680399a78f
xfs: simplify xfs_file_iomap_begin() logic

The current logic that determines whether allocation should be done
has grown somewhat spaghetti like with the addition of IOMAP_NOWAIT
functionality. Separate out each of the different cases into single,
obvious checks to get rid most of the nested IOMAP_NOWAIT checks
in the allocation logic.

Signed-Off-By: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Carlos Maiolino <cmaiolino@redhat.com>
Reviewed-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>
fs/xfs/xfs_iomap.c