From: Ye Yin Date: Fri, 23 Nov 2018 17:55:18 +0000 (-0800) Subject: fs/xfs: fix f_ffree value for statfs when project quota is set X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=de7243057e7cefa923fa5f467c0f1ec24eef41d2;p=linux.git fs/xfs: fix f_ffree value for statfs when project quota is set When project is set, we should use inode limit minus the used count Signed-off-by: Ye Yin Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong --- diff --git a/fs/xfs/xfs_qm_bhv.c b/fs/xfs/xfs_qm_bhv.c index 73a1d77ec187c..3091e4bc04efe 100644 --- a/fs/xfs/xfs_qm_bhv.c +++ b/fs/xfs/xfs_qm_bhv.c @@ -40,7 +40,7 @@ xfs_fill_statvfs_from_dquot( statp->f_files = limit; statp->f_ffree = (statp->f_files > dqp->q_res_icount) ? - (statp->f_ffree - dqp->q_res_icount) : 0; + (statp->f_files - dqp->q_res_icount) : 0; } }