]> git.karo-electronics.de Git - karo-tx-linux.git/commit
xfs: push the ilock into xfs_zero_eof
authorChristoph Hellwig <hch@infradead.org>
Tue, 27 Mar 2012 14:34:49 +0000 (10:34 -0400)
committerBen Myers <bpm@sgi.com>
Thu, 19 Apr 2012 22:08:27 +0000 (17:08 -0500)
commitf169ed0da9e6975d6b08052f077b7d2204d4dbc1
treeab68802be2bc151911732a78c3acd84604164b20
parent772b63c7cacb9edb5b1a4dc08070dae34a17171d
xfs: push the ilock into xfs_zero_eof

Instead of calling xfs_zero_eof with the ilock held only take it internally
for the minimall required critical section around xfs_bmapi_read.  This
also requires changing the calling convention for xfs_zero_last_block
slightly.  The actual zeroing operation is still serialized by the iolock,
which must be taken exclusively over the call to xfs_zero_eof.

We could in fact use a shared lock for the xfs_bmapi_read calls as long as
the extent list has been read in, but given that we already hold the iolock
exclusively there is little reason to micro optimize this further.

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