Messages in this thread | | | From | Linus Torvalds <> | Date | Thu, 5 Dec 2019 15:58:30 -0800 | Subject | Re: [PATCH 2/2] pipe: Fix missing mask update after pipe_wait() [ver #2] |
| |
On Thu, Dec 5, 2019 at 2:30 PM David Howells <dhowells@redhat.com> wrote: > > - struct pipe_buffer *buf = &pipe->bufs[(head - 1) & mask]; > + struct pipe_buffer *buf = > + &pipe->bufs[(head - 1) & (pipe->ring_size - 1)];
I changed the two occurrences of this to use a local temporary "mask" variable, to avoid the long lines.
It's no longer _caching_ the value, but it makes the code more legible.
Linus
| |