Thread (1354 messages) 1354 messages, 168 authors, 2017-04-12

Re: [PATCH v2 2/2] kernel-trace: Less calls for iput() in create_trace_uprobe() after error detectio

From: Julia Lawall <hidden>
Date: 2014-11-16 19:35:19
Also in: cocci, lkml

On Sun, 16 Nov 2014, Steven Rostedt wrote:
On Sun, 16 Nov 2014 20:22:22 +0100
SF Markus Elfring [off-list ref] wrote:
quoted
From: Markus Elfring <redacted>
Date: Sun, 16 Nov 2014 19:49:39 +0100

The iput() function was called in three cases by the create_trace_uprobe()
function during error handling even if the passed variable contained still
a null pointer. This implementation detail could be improved by the
introduction of another jump label.
The first patch is fine, and the only reason is to save the few bytes
that the branch check might take. It's in a path that is unlikely to be
hit so it is not a performance issue at all.

This patch is useless. I rather not apply any patch than to create
another jump that skips over the freeing of iput() just because we know
inode is null. That's why we had the if (inode) in the first place.

So Nack on this patch and I'll contemplate applying the first one. I
probably will as it seems rather harmless.
I wuold have thought that one could have just returned, like in the cases
above...  But maybe the printed message is useful.

julia
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help