xfs: fix double IRELE in xfs_dqrele_inode
authorChristoph Hellwig <hch@infradead.org>
Mon, 12 Oct 2009 23:42:10 +0000 (23:42 +0000)
committerAlex Elder <aelder@sgi.com>
Tue, 13 Oct 2009 18:16:36 +0000 (13:16 -0500)
commit05277c75f6dea8ecf59138cd1b6781fb54ae08bd
treee61d1206c3201b306f4fadeb1a4fb2cdd55fa887
parentd0800703febc04827b8fa91921aa4e254d01e8d1
xfs: fix double IRELE in xfs_dqrele_inode

xfs_dqrele_inode calls xfs_iput to release the ilock and a reference
and then also calls IRELE which does a second decrement of the reference
count.  This leads to a premature freeing of inodes when quotas were turned
off while the filesystem was mounted.

Thanks to Utako Kusaka for reporting the bug and provinding a good testcase.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reported-by: Utako Kusaka <u-kusaka@wm.jp.nec.com>
Reviewed-by: Alex Elder <aelder@sgi.com>
Signed-off-by: Alex Elder <aelder@sgi.com>
fs/xfs/quota/xfs_qm_syscalls.c