xfs: take the ilock shared if possible in xfs_file_iomap_begin
authorChristoph Hellwig <hch@lst.de>
Mon, 19 Sep 2016 01:26:39 +0000 (11:26 +1000)
committerDave Chinner <david@fromorbit.com>
Mon, 19 Sep 2016 01:26:39 +0000 (11:26 +1000)
commit66642c5c1dea411dd2842159f9f297ce8e914994
tree693c729488f40154f7fd6878afc9897209ec82cd
parent17879e8f865f4ed8b6f9041a2687ad40f13ae460
xfs: take the ilock shared if possible in xfs_file_iomap_begin

We always just read the extent first, and will later lock exlusively
after first dropping the lock in case we actually allocate blocks.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
fs/xfs/xfs_iomap.c