Commit 757332c6 authored by Ye Yin's avatar Ye Yin Committed by Greg Kroah-Hartman

fs/xfs: fix f_ffree value for statfs when project quota is set

commit de724305 upsream.

When project is set, we should use inode limit minus the used count
Signed-off-by: default avatarYe Yin <dbyin@tencent.com>
Reviewed-by: default avatarDarrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: default avatarDarrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: default avatarLuis Chamberlain <mcgrof@kernel.org>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 886f0de1
...@@ -40,7 +40,7 @@ xfs_fill_statvfs_from_dquot( ...@@ -40,7 +40,7 @@ xfs_fill_statvfs_from_dquot(
statp->f_files = limit; statp->f_files = limit;
statp->f_ffree = statp->f_ffree =
(statp->f_files > dqp->q_res_icount) ? (statp->f_files > dqp->q_res_icount) ?
(statp->f_ffree - dqp->q_res_icount) : 0; (statp->f_files - dqp->q_res_icount) : 0;
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment