xfs: stop using xfs_qm_dqtobp in xfs_qm_dqflush
authorChristoph Hellwig <hch@infradead.org>
Mon, 6 Sep 2010 01:44:45 +0000 (01:44 +0000)
committerAlex Elder <aelder@sgi.com>
Mon, 18 Oct 2010 20:07:37 +0000 (15:07 -0500)
commitacecf1b5d8a846bf818bf74df454330f0b444b0a
tree9d337467b6882bff99fec04cd30b6cc0a831da5f
parent52fda114249578311776b25da9f73a9c34f4fd8c
xfs: stop using xfs_qm_dqtobp in xfs_qm_dqflush

In xfs_qm_dqflush we know that q_blkno must be initialized already from a
previous xfs_qm_dqread.  So instead of calling xfs_qm_dqtobp we can
simply read the quota buffer directly.  This also saves us from a duplicate
xfs_qm_dqcheck call check and allows xfs_qm_dqtobp to be simplified now
that it is always called for a newly initialized inode.  In addition to
that properly unwind all locks in xfs_qm_dqflush when xfs_qm_dqcheck
fails.

This mirrors a similar cleanup in the inode lookup done earlier.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Alex Elder <aelder@sgi.com>
fs/xfs/quota/xfs_dquot.c