fs: eventfd - Removed redundant initialization of res in BLOCKing mode
PATCH 1/1 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 <[email protected]>
--- fs/eventfd.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
fs/eventfd.c +1 -1
@@ -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);
Signature · 1 line
1.7.3.4