* [PATCH] cgroup: remove redundant check
[not found] ` <1356030701-16284-1-git-send-email-sasha.levin-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
@ 2012-12-20 19:11 ` Sasha Levin
[not found] ` <1356030701-16284-23-git-send-email-sasha.levin-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
0 siblings, 1 reply; 3+ messages in thread
From: Sasha Levin @ 2012-12-20 19:11 UTC (permalink / raw)
To: Tejun Heo, Li Zefan,
containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA,
cgroups-u79uwXL29TY76Z2rM5mHXA,
linux-kernel-u79uwXL29TY76Z2rM5mHXA
Cc: Sasha Levin
We already know that 'event' is non-NULL, remove the redundant check.
Signed-off-by: Sasha Levin <sasha.levin-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
---
kernel/cgroup.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/cgroup.c b/kernel/cgroup.c
index 4855892..8d6c3f2 100644
--- a/kernel/cgroup.c
+++ b/kernel/cgroup.c
@@ -3898,7 +3898,7 @@ fail:
if (cfile)
fput(cfile);
- if (event && event->eventfd && !IS_ERR(event->eventfd))
+ if (event->eventfd && !IS_ERR(event->eventfd))
eventfd_ctx_put(event->eventfd);
if (!IS_ERR_OR_NULL(efile))
--
1.8.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] cgroup: remove redundant check
[not found] ` <1356030701-16284-23-git-send-email-sasha.levin-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
@ 2012-12-20 19:18 ` Tejun Heo
[not found] ` <20121220191803.GA14527-Gd/HAXX7CRxy/B6EtB590w@public.gmane.org>
0 siblings, 1 reply; 3+ messages in thread
From: Tejun Heo @ 2012-12-20 19:18 UTC (permalink / raw)
To: Sasha Levin
Cc: cgroups-u79uwXL29TY76Z2rM5mHXA,
containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA,
linux-kernel-u79uwXL29TY76Z2rM5mHXA
On Thu, Dec 20, 2012 at 02:11:31PM -0500, Sasha Levin wrote:
> We already know that 'event' is non-NULL, remove the redundant check.
>
> Signed-off-by: Sasha Levin <sasha.levin-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
I don't know. I kinda like that test there. It's not an error path
and tearing down everything which could have been allocated. If the
test not being used is bothering, convert return -ENOMEM to goto fail?
--
tejun
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] cgroup: remove redundant check
[not found] ` <20121220191803.GA14527-Gd/HAXX7CRxy/B6EtB590w@public.gmane.org>
@ 2012-12-20 19:24 ` Sasha Levin
0 siblings, 0 replies; 3+ messages in thread
From: Sasha Levin @ 2012-12-20 19:24 UTC (permalink / raw)
To: Tejun Heo
Cc: cgroups-u79uwXL29TY76Z2rM5mHXA,
containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA,
linux-kernel-u79uwXL29TY76Z2rM5mHXA
On 12/20/2012 02:18 PM, Tejun Heo wrote:
> On Thu, Dec 20, 2012 at 02:11:31PM -0500, Sasha Levin wrote:
>> We already know that 'event' is non-NULL, remove the redundant check.
>>
>> Signed-off-by: Sasha Levin <sasha.levin-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
>
> I don't know. I kinda like that test there. It's not an error path
> and tearing down everything which could have been allocated. If the
> test not being used is bothering, convert return -ENOMEM to goto fail?
Can't say it's bothering. If you'd prefer to leave it as is I'm okay with
doing that.
Thanks,
Sasha
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-12-20 19:24 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <1356030701-16284-1-git-send-email-sasha.levin@oracle.com>
[not found] ` <1356030701-16284-1-git-send-email-sasha.levin-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
2012-12-20 19:11 ` [PATCH] cgroup: remove redundant check Sasha Levin
[not found] ` <1356030701-16284-23-git-send-email-sasha.levin-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
2012-12-20 19:18 ` Tejun Heo
[not found] ` <20121220191803.GA14527-Gd/HAXX7CRxy/B6EtB590w@public.gmane.org>
2012-12-20 19:24 ` Sasha Levin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox