提交 85e7340f 编写于 作者: S Shawn Lin 提交者: Al Viro

fs: compat: remove redundant check of nr_segs

nr_segs should never be less than zero as its type
is unsigned long, so let's remove this check.
Signed-off-by: NShawn Lin <shawn.lin@rock-chips.com>
Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
上级 a818101d
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册