diff options
author | Christoph Hellwig <hch@infradead.org> | 2010-03-12 09:42:13 +1100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-04-26 07:41:16 -0700 |
commit | 1b8e6dfb4997f2950cf6720f5b7a434a04ee80f0 (patch) | |
tree | 736c5e07374f17ab3efc4e192ee40f02dd21d4eb /fs | |
parent | 059f754c44af50340f8921df60091254b0bfb1e6 (diff) | |
download | lwn-1b8e6dfb4997f2950cf6720f5b7a434a04ee80f0.tar.gz lwn-1b8e6dfb4997f2950cf6720f5b7a434a04ee80f0.zip |
xfs: quota limit statvfs available blocks
commit 9b00f30762fe9f914eb6e03057a616ed63a4e8ca upstream
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>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/xfs/quota/xfs_qm_bhv.c | 2 |
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; } |