summaryrefslogtreecommitdiff
path: root/mm
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2018-12-04 10:49:55 +0000
committerMark Brown <broonie@kernel.org>2018-12-04 10:49:55 +0000
commit684d5e05df8cdc18791e76b11f6bc85ecd4d9416 (patch)
tree4c4f0ab4a18b95acab9bc2816e80b4a5ddc9b985 /mm
parent375fef4f04334199a0759ad7ac2572060122a189 (diff)
parent56ccc3f7a7ee1f0ab64453794ebbc7d9a4c8ddf7 (diff)
Merge tag 'v4.4.166' into linux-linaro-lsk-v4.4
This is the 4.4.166 stable release
Diffstat (limited to 'mm')
-rw-r--r--mm/shmem.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/mm/shmem.c b/mm/shmem.c
index 8e506a45a6ef..d902b413941a 100644
--- a/mm/shmem.c
+++ b/mm/shmem.c
@@ -1818,9 +1818,7 @@ static loff_t shmem_file_llseek(struct file *file, loff_t offset, int whence)
mutex_lock(&inode->i_mutex);
/* 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_CACHE_SHIFT;