diff options
author | Shawn Lin <shawn.lin@rock-chips.com> | 2016-08-22 09:45:59 +0200 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2016-09-28 00:47:38 +0200 |
commit | 85e7340f21d3a88883e54cd2a5d7ebf04e827eeb (patch) | |
tree | f502ff9ce4bf2962a72c5b7f47532c8deb631f01 /fs/compat.c | |
parent | cachefiles: Fix attempt to read i_blocks after deleting file [ver #2] (diff) | |
download | linux-85e7340f21d3a88883e54cd2a5d7ebf04e827eeb.tar.xz linux-85e7340f21d3a88883e54cd2a5d7ebf04e827eeb.zip |
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: Shawn Lin <shawn.lin@rock-chips.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/compat.c')
-rw-r--r-- | fs/compat.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/compat.c b/fs/compat.c index be6e48b0a46c..5bc3a4b245bb 100644 --- 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; |