[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.10.1411291338530.2378@hadrien>
Date: Sat, 29 Nov 2014 13:40:34 +0100 (CET)
From: Julia Lawall <julia.lawall@...6.fr>
To: OGAWA Hirofumi <hirofumi@...l.parknet.co.jp>
cc: SF Markus Elfring <elfring@...rs.sourceforge.net>,
Julia Lawall <julia.lawall@...6.fr>,
linux-kernel@...r.kernel.org, kernel-janitors@...r.kernel.org,
trivial@...nel.org, Coccinelle <cocci@...teme.lip6.fr>
Subject: Re: [PATCH v2] fs-fat: Less function calls in fat_fill_super() after
error detection
On Sat, 29 Nov 2014, OGAWA Hirofumi wrote:
> SF Markus Elfring <elfring@...rs.sourceforge.net> writes:
>
> > From: Markus Elfring <elfring@...rs.sourceforge.net>
> > Date: Sat, 29 Nov 2014 07:37:34 +0100
> >
> > The iput() function was called in an inefficient way by the implementation
> > of the fat_fill_super() function in case of an allocation failure.
> > The corresponding source code was improved by deletion of two unnecessary
> > null pointer checks and a few adjustments for jump labels.
>
> iput() checks NULL of inode. What is wrong just remove NULL check,
> instead of adding new jump labels?
Personally, I prefer that code that can be statically determined not to
need to be executed not to be executed. It can make the code easier to
understand, because each function is only called when doing so is useful,
and it can be helpful to static analysis.
julia
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists