projects
/
platform
/
kernel
/
linux-rpi3.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a818101
)
fs: compat: remove redundant check of nr_segs
author
Shawn Lin
<shawn.lin@rock-chips.com>
Mon, 22 Aug 2016 07:45:59 +0000
(15:45 +0800)
committer
Al Viro
<viro@zeniv.linux.org.uk>
Tue, 27 Sep 2016 22:47:38 +0000
(18:47 -0400)
nr_segs should never be less than zero as its type
is unsigned long, so let's remove this check.
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/compat.c
patch
|
blob
|
history
diff --git
a/fs/compat.c
b/fs/compat.c
index
be6e48b
..
5bc3a4b
100644
(file)
--- a/
fs/compat.c
+++ b/
fs/compat.c
@@
-562,7
+562,7
@@
ssize_t compat_rw_copy_check_uvector(int type,
goto out;
ret = -EINVAL;
- if (nr_segs > UIO_MAXIOV
|| nr_segs < 0
)
+ if (nr_segs > UIO_MAXIOV)
goto out;
if (nr_segs > fast_segs) {
ret = -ENOMEM;