[<prev] [next>] [day] [month] [year] [list]
Message-Id: <1334846064-11994-1-git-send-email-sasikanth.v19@gmail.com>
Date: Thu, 19 Apr 2012 20:04:24 +0530
From: Sasikantha babu <sasikanth.v19@...il.com>
To: Alexander Viro <viro@...iv.linux.org.uk>
Cc: linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org,
Sasikantha babu <sasikanth.v19@...il.com>
Subject: [PATCH] fs: eventfd - Removed redundant initialization of res in BLOCKing mode
Removed redundant initialization of res to 0, since eventfd_write in
blocking mode guarantees res to be either sizeof(ucnt) or -ERESTARTSYS.
Signed-off-by: Sasikantha babu <sasikanth.v19@...il.com>
---
fs/eventfd.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/fs/eventfd.c b/fs/eventfd.c
index dba15fe..6bd051c 100644
--- a/fs/eventfd.c
+++ b/fs/eventfd.c
@@ -261,7 +261,7 @@ static ssize_t eventfd_write(struct file *file, const char __user *buf, size_t c
res = sizeof(ucnt);
else if (!(file->f_flags & O_NONBLOCK)) {
__add_wait_queue(&ctx->wqh, &wait);
- for (res = 0;;) {
+ for (;;) {
set_current_state(TASK_INTERRUPTIBLE);
if (ULLONG_MAX - ctx->count > ucnt) {
res = sizeof(ucnt);
--
1.7.3.4
--
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