xfs: always hold the iolock when calling xfs_change_file_space
authorChristoph Hellwig <hch@infradead.org>
Sat, 12 Oct 2013 07:55:06 +0000 (00:55 -0700)
committerBen Myers <bpm@sgi.com>
Mon, 21 Oct 2013 21:54:22 +0000 (16:54 -0500)
commit5f8aca8b43f41c4b2d4dc5389124a40cab92b644
tree703fc7c2042cc467022cf1be22efdd72e829c3af
parent001a3e73706fcb8c52dcca1d4742679384d04184
xfs: always hold the iolock when calling xfs_change_file_space

Currently fallocate always holds the iolock when calling into
xfs_change_file_space, while the ioctl path lets some of the lower level
functions take it, but leave it out in others.

This patch makes sure the ioctl path also always holds the iolock and
thus introduces consistent locking for the preallocation operations while
simplifying the code and allowing to kill the now unused XFS_ATTR_NOLOCK
flag.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Ben Myers <bpm@sgi.com>
fs/xfs/xfs_bmap_util.c
fs/xfs/xfs_file.c
fs/xfs/xfs_ioctl.c
fs/xfs/xfs_iops.h