提交 6cc6b122 编写于 作者: C Carsten Otte 提交者: Linus Torvalds

[PATCH] remove needless check in fs/read_write.c

nr_segs is unsigned long and thus cannot be negative.  We checked against 0
few lines before.
Signed-off-by: NCarsten Otte <cotte@de.ibm.com>
Signed-off-by: NAndrew Morton <akpm@osdl.org>
Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
上级 55148548
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册