Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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 <dbyin@tencent.com>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>

authored by

Ye Yin and committed by
Darrick J. Wong
de724305 8c110d43

+1 -1
+1 -1
fs/xfs/xfs_qm_bhv.c
··· 40 40 statp->f_files = limit; 41 41 statp->f_ffree = 42 42 (statp->f_files > dqp->q_res_icount) ? 43 - (statp->f_ffree - dqp->q_res_icount) : 0; 43 + (statp->f_files - dqp->q_res_icount) : 0; 44 44 } 45 45 } 46 46