* [PATCH] epoll: use kmalloc() in ep_alloc()
@ 2011-01-12 12:19 Namhyung Kim
0 siblings, 0 replies; only message in thread
From: Namhyung Kim @ 2011-01-12 12:19 UTC (permalink / raw)
To: Alexander Viro, Davide Libenzi; +Cc: linux-fsdevel, linux-kernel
Use kmalloc() instead of kzalloc() in ep_alloc(). It seems that
no need to zero-initialize struct eventpoll simply because all
of the fields in the struct will be set properly right after.
The struct might contain paddings in it but IMHO it would not
be a problem since it will not be accessed from the outside of
epoll code.
Signed-off-by: Namhyung Kim <namhyung@gmail.com>
---
fs/eventpoll.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/fs/eventpoll.c b/fs/eventpoll.c
index 2e21fb85b8b6..bdea67ed9762 100644
--- a/fs/eventpoll.c
+++ b/fs/eventpoll.c
@@ -728,7 +728,7 @@ static int ep_alloc(struct eventpoll **pep)
user = get_current_user();
error = -ENOMEM;
- ep = kzalloc(sizeof(*ep), GFP_KERNEL);
+ ep = kmalloc(sizeof(*ep), GFP_KERNEL);
if (unlikely(!ep))
goto free_uid;
--
1.7.3.4.600.g982838b0
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2011-01-12 12:20 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-12 12:19 [PATCH] epoll: use kmalloc() in ep_alloc() Namhyung Kim
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).