[PATCH v3] xfs: ensure f_ffree returned by statfs() is non-negative
Christoph Hellwig
hch at infradead.org
Fri Aug 6 08:02:53 CDT 2010
Good changelog this time around, thanks.
> - statp->f_ffree = statp->f_files - (sbp->sb_icount -
> sbp->sb_ifree);
Your mailer line-wrapper the patch here.
> + ffree = statp->f_files - (sbp->sb_icount - sbp->sb_ifree);
> + statp->f_ffree = (__u64) (ffree < 0 ? 0 : ffree);
Why not just use min_t here?
statp->f_ffree = max_t(__int64_t, ffree, 0);
More information about the xfs
mailing list