public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
From: Artem Bityutskiy <dedekind1@gmail.com>
To: linux-mtd@lists.infradead.org
Subject: Re: [PATCH 05/10] UBIFS: fix shrinker object count reports
Date: Fri, 03 Jun 2011 17:30:13 +0300	[thread overview]
Message-ID: <1307111413.3069.5.camel@localhost> (raw)
In-Reply-To: <1307108926.3069.0.camel@localhost>

On Fri, 2011-06-03 at 16:48 +0300, Artem Bityutskiy wrote:
> On Fri, 2011-06-03 at 16:49 +0300, Artem Bityutskiy wrote:
> > +		/*
> > +		 * Due to the way UBIFS updates the clean znode counter it may
> > +		 * temporarily be negative.
> > +		 */
> > +		return clean_zn_cnt > 0 ?: 1;
> 
> Oh, this should be  clean_zn_cnt >= 0 ?: 1;

Crap, sorry, stupid me :-)

return clean_zn_cnt < 0 ?: clean_zn_cnt;

But yeah, it is saner to not use "?:" at all:

return clean_zn_cnt >= 0 ? clean_zn_cnt: 1;

-- 
Best Regards,
Artem Bityutskiy (Артём Битюцкий)

  reply	other threads:[~2011-06-03 14:34 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-03 13:49 [PATCH 00/10] UBIFS: for Linux 3.0 Artem Bityutskiy
2011-06-03 13:49 ` [PATCH 01/10] UBIFS: supress false error messages Artem Bityutskiy
2011-06-03 13:49 ` [PATCH 02/10] UBIFS: introduce a "grouped" journal head flag Artem Bityutskiy
2011-06-03 13:49 ` [PATCH 03/10] UBIFS: amend ubifs_recover_leb interface Artem Bityutskiy
2011-06-03 13:49 ` [PATCH 04/10] UBIFS: fix recovery broken by the previous recovery fix Artem Bityutskiy
2011-06-03 13:49 ` [PATCH 05/10] UBIFS: fix shrinker object count reports Artem Bityutskiy
2011-06-03 13:48   ` Artem Bityutskiy
2011-06-03 14:30     ` Artem Bityutskiy [this message]
2011-06-03 15:06       ` Artem Bityutskiy
2011-06-03 13:49 ` [PATCH 06/10] UBIFS: fix memory leak on error path Artem Bityutskiy
2011-06-03 13:49 ` [PATCH 07/10] UBIFS: fix clean znode counter corruption in error cases Artem Bityutskiy
2011-06-03 13:49 ` [PATCH 08/10] UBIFS: assert no fixup when writing a node Artem Bityutskiy
2011-06-03 13:50 ` [PATCH 09/10] UBIFS: intialize LPT earlier Artem Bityutskiy
2011-06-03 13:50 ` [PATCH 10/10] UBIFS: fix-up free space earlier Artem Bityutskiy

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=1307111413.3069.5.camel@localhost \
    --to=dedekind1@gmail.com \
    --cc=linux-mtd@lists.infradead.org \
    /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