[PATCH 0/2] pipe: change pipe_write() to never add a zero-sized buffer

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Please review.

pipe_write() can insert the empty buffer and this looks very confusing
to me. Because it looks obviously unnecessary and complicates the code.

In fact this logic doesn't even look strictly correct. For example,
eat_empty_buffer() simply updates pipe->tail but (unlike pipe_read) it
doesn't wake the writers.

But is pipe_write() is the only possible source of buf->len == 0 ?
I am not 100% sure, fs/splice.c is very nontrivial, but it seems that
this code at least tries to not add a zero-sized buf into pipe->bufs.

Oleg.
---

 fs/pipe.c                 | 47 ++++++++++-------------------------------------
 fs/splice.c               | 14 ++++++--------
 include/linux/pipe_fs_i.h |  6 ++++++
 3 files changed, 22 insertions(+), 45 deletions(-)





[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux