From 11e3416ae78d09380c523b703fad8dee145658d5 Mon Sep 17 00:00:00 2001 From: Richard Yao Date: Thu, 3 Nov 2022 13:47:48 -0400 Subject: [PATCH] Cleanup: Remove branches that always evaluate the same way Coverity reported that the ASSERT in taskq_create() is always true and the `*offp > MAXOFFSET_T` check in zfs_file_seek() is always false. We delete them as cleanup. Reviewed-by: Brian Behlendorf Signed-off-by: Richard Yao Closes #14130 --- module/os/linux/spl/spl-taskq.c | 1 - module/os/linux/zfs/zfs_file_os.c | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/module/os/linux/spl/spl-taskq.c b/module/os/linux/spl/spl-taskq.c index abf4dca585..84497359ce 100644 --- a/module/os/linux/spl/spl-taskq.c +++ b/module/os/linux/spl/spl-taskq.c @@ -1048,7 +1048,6 @@ taskq_create(const char *name, int threads_arg, pri_t pri, ASSERT(name != NULL); ASSERT(minalloc >= 0); - ASSERT(maxalloc <= INT_MAX); ASSERT(!(flags & (TASKQ_CPR_SAFE))); /* Unsupported */ /* Scale the number of threads using nthreads as a percentage */ diff --git a/module/os/linux/zfs/zfs_file_os.c b/module/os/linux/zfs/zfs_file_os.c index da80428402..bc753614be 100644 --- a/module/os/linux/zfs/zfs_file_os.c +++ b/module/os/linux/zfs/zfs_file_os.c @@ -246,7 +246,7 @@ zfs_file_seek(zfs_file_t *fp, loff_t *offp, int whence) { loff_t rc; - if (*offp < 0 || *offp > MAXOFFSET_T) + if (*offp < 0) return (EINVAL); rc = vfs_llseek(fp, *offp, whence);