diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-11-26 07:54:40 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-11-26 07:54:40 +0100 |
commit | a62d2d44902cf1222b5ac41ff1f61167a010cd6b (patch) | |
tree | fd3740b483e806c03896a59a6189e5959c899579 /mm/shmem.c | |
parent | f4b614adbf3aceaa4dab034665c379352777de39 (diff) | |
parent | 2e6e902d185027f8e3cb8b7305238f7e35d6a436 (diff) | |
download | kernel_replicant_linux-a62d2d44902cf1222b5ac41ff1f61167a010cd6b.tar.gz kernel_replicant_linux-a62d2d44902cf1222b5ac41ff1f61167a010cd6b.tar.bz2 kernel_replicant_linux-a62d2d44902cf1222b5ac41ff1f61167a010cd6b.zip |
Merge 4.20-rc4 into usb-next
We want the USB fixes in here as well.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'mm/shmem.c')
-rw-r--r-- | mm/shmem.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/mm/shmem.c b/mm/shmem.c index ea26d7a0342d..d44991ea5ed4 100644 --- a/mm/shmem.c +++ b/mm/shmem.c @@ -2563,9 +2563,7 @@ static loff_t shmem_file_llseek(struct file *file, loff_t offset, int whence) inode_lock(inode); /* We're holding i_mutex so we can access i_size directly */ - if (offset < 0) - offset = -EINVAL; - else if (offset >= inode->i_size) + if (offset < 0 || offset >= inode->i_size) offset = -ENXIO; else { start = offset >> PAGE_SHIFT; |