From: Andi Kleen <andi@firstfloor.org>
To: Felix Blyakher <felixb@sgi.com>
Cc: Christoph Hellwig <hch@infradead.org>,
Andi Kleen <andi@firstfloor.org>, Hedi Berriche <hedi@sgi.com>,
xfs@oss.sgi.com
Subject: Re: [PATCH] xfs: prevent deadlock in xfs_qm_shake()
Date: Sat, 30 May 2009 18:14:25 +0200 [thread overview]
Message-ID: <20090530161425.GO1065@one.firstfloor.org> (raw)
In-Reply-To: <1A09BC73-E1E8-4EF4-AD29-FB93556C3E3B@sgi.com>
On Sat, May 30, 2009 at 09:57:20AM -0500, Felix Blyakher wrote:
>
> (gfp_mask & __GFP_WAIT && gfp_mask & __GFP_FS) != 0 or as Andi noted
> (gfp_mask & (__GFP_WAIT|__GFP_FS)) == (__GFP_WAIT|__GFP_FS)
>
> I'd prefer the former, as in my original patch.
>
> Also, I accidentally put an extra open brace in a statement. After a
> successful build I started playing with braces for more readability,
> and left it in inconsistent state.
> Seems like the preferred style in the kernel is as following:
>
> return ((gfp_mask & __GFP_WAIT) && (gfp_mask & __GFP_FS)) != 0;
I would say it is
return (gfp_mask & __GFP_WAIT) && (gfp_mask & __GFP_FS);
The != 0 is completely superfluous.
-Andi
--
ak@linux.intel.com -- Speaking for myself only.
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
prev parent reply other threads:[~2009-05-30 16:07 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-29 18:10 XFS: prevent deadlock in quota code when recursing into filesystem Felix Blyakher
2009-05-29 18:10 ` [PATCH] xfs: prevent deadlock in xfs_qm_shake() Felix Blyakher
2009-05-29 19:25 ` Christoph Hellwig
2009-05-29 19:29 ` Felix Blyakher
2009-05-30 10:43 ` Andi Kleen
2009-05-30 14:57 ` Felix Blyakher
2009-05-30 16:14 ` Andi Kleen [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=20090530161425.GO1065@one.firstfloor.org \
--to=andi@firstfloor.org \
--cc=felixb@sgi.com \
--cc=hch@infradead.org \
--cc=hedi@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.