Skip to contentSkip to conversation

pipe: Remove redundant zeroing of pipe->offset

PATCH New Nikolay Borisov 1 participant 1 message Jun 3, 2022 VFS

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 pipe: Remove redundant zeroing of pipe->offset

This member is already set to 0 for the newly initialized buffer, no need to duplicate the operation.

---
 fs/pipe.c | 1 -
 1 file changed, 1 deletion(-)
fs/pipe.c +0 -1
index 74ae9fafd25a..56950aa850be 100644
@@ -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))
Signature · 1 line
2.25.1