Re: [PATCH v3] xfs: ensure f_ffree returned by statfs() is non-negative

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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);

_______________________________________________
xfs mailing list
xfs@xxxxxxxxxxx
http://oss.sgi.com/mailman/listinfo/xfs


[Index of Archives]     [Linux XFS Devel]     [Linux Filesystem Development]     [Filesystem Testing]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux