[<prev] [next>] [day] [month] [year] [list]
Message-Id: <1294834795-3987-1-git-send-email-namhyung@gmail.com>
Date: Wed, 12 Jan 2011 21:19:55 +0900
From: Namhyung Kim <namhyung@...il.com>
To: Alexander Viro <viro@...iv.linux.org.uk>,
Davide Libenzi <davidel@...ilserver.org>
Cc: linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [PATCH] epoll: use kmalloc() in ep_alloc()
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@...il.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
--
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