]> git.baikalelectronics.ru Git - kernel.git/commit
xfs: make inode quota check more general
authorMitsuo Hayasaka <mitsuo.hayasaka.hu@hitachi.com>
Mon, 6 Feb 2012 12:50:30 +0000 (12:50 +0000)
committerBen Myers <bpm@sgi.com>
Tue, 21 Feb 2012 16:13:59 +0000 (10:13 -0600)
commit38530bd5c278ad3dda4b769c5a3263678e230b10
tree7013fa079406cd6fecda0dd79b49ecf41383d1c2
parent3937ffa0a305cba0cbd571ff2197ad8974537da4
xfs: make inode quota check more general

The xfs checks quota when reserving disk blocks and inodes. In the block
reservation, it checks if the total number of blocks including current
usage and new reservation exceed quota. In the inode reservation,
it checks using the total number of inodes including only current usage
without new reservation. However, this inode quota check works well
since the caller of xfs_trans_dquot() always sets the argument of the
number of new inode reservation to 1 or 0 and inode is reserved one by
one in current xfs.

To make it more general, this patch changes it to the same way as the
block quota check.

Signed-off-by: Mitsuo Hayasaka <mitsuo.hayasaka.hu@hitachi.com>
Cc: Ben Myers <bpm@sgi.com>
Cc: Alex Elder <elder@kernel.org>
Cc: Christoph Hellwig <hch@lst.de>
Reviewed-by: Mark Tinguely <tinguely@sgi.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Ben Myers <bpm@sgi.com>
(cherry picked from commit 6c51331ac851a193a296cc617a0219676d32498a)
fs/xfs/xfs_trans_dquot.c