lkml.org 
[lkml]   [2021]   [Nov]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 2/2] pipe: delete a duplicate line of code in pipe_write()
Date
The buf->offset has been assigned to 0 before the copy operation, and it
seems odd to readjust its value after the copy is complete. Delete the
second 'buf->offset = 0'.

Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
---
fs/pipe.c | 1 -
1 file changed, 1 deletion(-)

diff --git a/fs/pipe.c b/fs/pipe.c
index 302f1e50ce3be1d..7ba11a633c0eeb9 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.26.0.106.g9fadedd
\
 
 \ /
  Last update: 2021-11-15 04:59    [W:0.054 / U:0.228 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site