projects
/
GitHub
/
LineageOS
/
android_kernel_samsung_universal7580.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5514854
)
[PATCH] remove needless check in fs/read_write.c
author
Carsten Otte
<cotte@de.ibm.com>
Sat, 25 Mar 2006 11:08:23 +0000
(
03:08
-0800)
committer
Linus Torvalds
<torvalds@g5.osdl.org>
Sat, 25 Mar 2006 16:23:01 +0000
(08:23 -0800)
nr_segs is unsigned long and thus cannot be negative. We checked against 0
few lines before.
Signed-off-by: Carsten Otte <cotte@de.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
fs/read_write.c
patch
|
blob
|
blame
|
history
diff --git
a/fs/read_write.c
b/fs/read_write.c
index 3f7a1a62165f626e984de4849ce053cc8a824f65..34b1bf259efd239d5380282b689258285711fc5e 100644
(file)
--- a/
fs/read_write.c
+++ b/
fs/read_write.c
@@
-470,7
+470,7
@@
static ssize_t do_readv_writev(int type, struct file *file,
* verify all the pointers
*/
ret = -EINVAL;
- if (
(nr_segs > UIO_MAXIOV) || (nr_segs <= 0)
)
+ if (
nr_segs > UIO_MAXIOV
)
goto out;
if (!file->f_op)
goto out;