lkml.org 
[lkml]   [2022]   [Jun]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] pipe: Remove redundant zeroing of pipe->offset
Date
This member is already set to 0 for the newly initialized buffer, no
need to duplicate the operation.

Signed-off-by: Nikolay Borisov <nborisov@suse.com>
---
fs/pipe.c | 1 -
1 file changed, 1 deletion(-)

diff --git a/fs/pipe.c b/fs/pipe.c
index 74ae9fafd25a..56950aa850be 100644
--- a/fs/pipe.c
+++ b/fs/pipe.c
@@ -536,7 +536,6 @@ pipe_write(struct kiocb *iocb, struct iov_iter *from)
break;
}
ret += copied;
- buf->offset = 0;
buf->len = copied;

if (!iov_iter_count(from))
--
2.25.1
\
 
 \ /
  Last update: 2022-06-03 09:36    [W:0.328 / U:1.068 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site