[PATCH] xfs: prevent deadlock in xfs_qm_shake()
Andi Kleen
andi at firstfloor.org
Sat May 30 11:14:25 CDT 2009
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 at linux.intel.com -- Speaking for myself only.
More information about the xfs
mailing list