ext4: split IOMAP_WRITE branch in ext4_iomap_begin() into helper
authorMatthew Bobrowski <mbobrowski@mbobrowski.org>
Tue, 5 Nov 2019 12:00:14 +0000 (23:00 +1100)
committerTheodore Ts'o <tytso@mit.edu>
Tue, 5 Nov 2019 16:31:40 +0000 (11:31 -0500)
commitf063db5ee989aafe2dc9d571b5538f2a1f1cbad2
tree5fe00f5d90ce44b494c9ab9b772dbe42beae10a3
parentc8fdfe294187455b70e42a15df35a3e1882f332d
ext4: split IOMAP_WRITE branch in ext4_iomap_begin() into helper

In preparation for porting across the ext4 direct I/O path over to the
iomap infrastructure, split up the IOMAP_WRITE branch that's currently
within ext4_iomap_begin() into a separate helper
ext4_alloc_iomap(). This way, when we add in the necessary code for
direct I/O, we don't end up with ext4_iomap_begin() becoming a
monstrous twisty maze.

Signed-off-by: Matthew Bobrowski <mbobrowski@mbobrowski.org>
Reviewed-by: Jan Kara <jack@suse.cz>
Reviewed-by: Ritesh Harjani <riteshh@linux.ibm.com>
Link: https://lore.kernel.org/r/50eef383add1ea529651640574111076c55aca9f.1572949325.git.mbobrowski@mbobrowski.org
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
fs/ext4/inode.c