Re: [PATCH] xfs: negative_icount.patch V2

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

 



On Thu, Jul 29, 2010 at 03:18:38PM -0500, Stuart Brodsky wrote:
> can somebody please review this for me?

For a start it's still missing a useful subject line.

> +       long long               i;

Very bad naming of the variable, something like ffree would bebetter.
Also to fit with the rest of XFS it probably should be a __int64_t.

> +       i = statp->f_files - (sbp->sb_icount - sbp->sb_ifree);
> +       if( i < 0 )

wrong indentation.

> +               statp->f_ffree = 0;     /* cap at 0 */
> +       else
> +               statp->f_ffree = (__u64)i;

and it could probably done simpler as a

	statp->f_ffree = max_t(__int64_t, 0,
			statp->f_files + sbp->sb_ifree - sbp->sb_icount));

_______________________________________________
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