f2fs: Simplify bool conversion
authorYang Li <yang.lee@linux.alibaba.com>
Wed, 15 Dec 2021 02:38:58 +0000 (10:38 +0800)
committerJaegeuk Kim <jaegeuk@kernel.org>
Tue, 4 Jan 2022 21:20:57 +0000 (13:20 -0800)
Fix the following coccicheck warning:
./fs/f2fs/sysfs.c:491:41-46: WARNING: conversion to bool not needed here

Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fs/f2fs/sysfs.c

index c22bee8..f8a14b1 100644 (file)
@@ -491,7 +491,7 @@ out:
 
        if (!strcmp(a->attr.name, "gc_urgent_high_remaining")) {
                spin_lock(&sbi->gc_urgent_high_lock);
-               sbi->gc_urgent_high_limited = t == 0 ? false : true;
+               sbi->gc_urgent_high_limited = t != 0;
                sbi->gc_urgent_high_remaining = t;
                spin_unlock(&sbi->gc_urgent_high_lock);