diff options
author | Jens Axboe <axboe@kernel.dk> | 2017-08-28 21:00:44 +0200 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2017-08-28 21:00:44 +0200 |
commit | cd996fb47c360320cf25ac9503c16de085ea9cfc (patch) | |
tree | 38a4730b2c031afe7daf632064f9687f1e09194e /net/unix | |
parent | block: fix warning when I/O elevator is changed as request_queue is being rem... (diff) | |
parent | Linux 4.13-rc7 (diff) | |
download | linux-cd996fb47c360320cf25ac9503c16de085ea9cfc.tar.xz linux-cd996fb47c360320cf25ac9503c16de085ea9cfc.zip |
Merge tag 'v4.13-rc7' into for-4.14/block-postmerge
Linux 4.13-rc7
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'net/unix')
-rw-r--r-- | net/unix/af_unix.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/net/unix/af_unix.c b/net/unix/af_unix.c index 7b52a380d710..be8982b4f8c0 100644 --- a/net/unix/af_unix.c +++ b/net/unix/af_unix.c @@ -2304,10 +2304,7 @@ static int unix_stream_read_generic(struct unix_stream_read_state *state, */ mutex_lock(&u->iolock); - if (flags & MSG_PEEK) - skip = sk_peek_offset(sk, flags); - else - skip = 0; + skip = max(sk_peek_offset(sk, flags), 0); do { int chunk; |