]> git.karo-electronics.de Git - karo-tx-linux.git/commit
xfs: move DIO mapping size calculation
authorDave Chinner <dchinner@redhat.com>
Thu, 16 Apr 2015 11:58:21 +0000 (21:58 +1000)
committerDave Chinner <david@fromorbit.com>
Thu, 16 Apr 2015 11:58:21 +0000 (21:58 +1000)
commit1fdca9c21198b2c2869086ac3629612492476f28
treeb2ec1608fd65a331eb518c13420bc75c4f02ee52
parenta719370be52d1152a5f6e19c4af3b73280e25475
xfs: move DIO mapping size calculation

The mapping size calculation is done last in __xfs_get_blocks(), but
we are going to need the actual mapping size we will use to map the
direct IO correctly in xfs_map_direct(). Factor out the calculation
for code clarity, and move the call to be the first operation in
mapping the extent to the returned buffer.

Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Brian Foster <bfoster@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
fs/xfs/xfs_aops.c