summaryrefslogtreecommitdiffstats
path: root/fs/xfs/quota/xfs_qm_bhv.c
diff options
context:
space:
mode:
authorChristoph Hellwig2010-01-21 12:17:20 +0100
committerAlex Elder2010-01-21 23:34:23 +0100
commit9b00f30762fe9f914eb6e03057a616ed63a4e8ca (patch)
tree11644521534de9828b17e028f0d9c5d960785720 /fs/xfs/quota/xfs_qm_bhv.c
parentxfs: replace KM_LARGE with explicit vmalloc use (diff)
downloadkernel-qcow2-linux-9b00f30762fe9f914eb6e03057a616ed63a4e8ca.tar.gz
kernel-qcow2-linux-9b00f30762fe9f914eb6e03057a616ed63a4e8ca.tar.xz
kernel-qcow2-linux-9b00f30762fe9f914eb6e03057a616ed63a4e8ca.zip
xfs: quota limit statvfs available blocks
A "df" run on an NFS client of an exported XFS file system reports the wrong information for "available" blocks. When a block quota is enforced, the amount reported as free is limited by the quota, but the amount reported available is not (and should be). Reported-by: Guk-Bong, Kwon <gbkwon@gmail.com> Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Alex Elder <aelder@sgi.com>
Diffstat (limited to 'fs/xfs/quota/xfs_qm_bhv.c')
-rw-r--r--fs/xfs/quota/xfs_qm_bhv.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/xfs/quota/xfs_qm_bhv.c b/fs/xfs/quota/xfs_qm_bhv.c
index a5346630dfae..97b410c12794 100644
--- a/fs/xfs/quota/xfs_qm_bhv.c
+++ b/fs/xfs/quota/xfs_qm_bhv.c
@@ -59,7 +59,7 @@ xfs_fill_statvfs_from_dquot(
be64_to_cpu(dp->d_blk_hardlimit);
if (limit && statp->f_blocks > limit) {
statp->f_blocks = limit;
- statp->f_bfree =
+ statp->f_bfree = statp->f_bavail =
(statp->f_blocks > be64_to_cpu(dp->d_bcount)) ?
(statp->f_blocks - be64_to_cpu(dp->d_bcount)) : 0;
}