From: Christoph Hellwig <hch@infradead.org>
To: Stuart Brodsky <sbrodsky@sgi.com>
Cc: xfs@oss.sgi.com
Subject: Re: [PATCH] xfs: negative_icount.patch V2
Date: Thu, 29 Jul 2010 16:55:14 -0400 [thread overview]
Message-ID: <20100729205514.GA6737@infradead.org> (raw)
In-Reply-To: <1280434718.7149.4.camel@superior.americas.sgi.com>
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@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
prev parent reply other threads:[~2010-07-29 20:52 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-29 20:18 [PATCH] xfs: negative_icount.patch V2 Stuart Brodsky
2010-07-29 20:55 ` Christoph Hellwig [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100729205514.GA6737@infradead.org \
--to=hch@infradead.org \
--cc=sbrodsky@sgi.com \
--cc=xfs@oss.sgi.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox