]> www.infradead.org Git - users/hch/configfs.git/commitdiff
ext4: remove unnecessary comparisons to bool
authorJason Yan <yanaijie@huawei.com>
Mon, 20 Apr 2020 04:29:18 +0000 (12:29 +0800)
committerTheodore Ts'o <tytso@mit.edu>
Thu, 4 Jun 2020 03:16:49 +0000 (23:16 -0400)
Fix the following coccicheck warning:

fs/ext4/extents_status.c:1057:5-28: WARNING: Comparison to bool
fs/ext4/inode.c:2314:18-24: WARNING: Comparison to bool

Signed-off-by: Jason Yan <yanaijie@huawei.com>
Reviewed-by: Ritesh Harjani <riteshh@linux.ibm.com>
Link: https://lore.kernel.org/r/20200420042918.19459-1-yanaijie@huawei.com
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
fs/ext4/extents_status.c
fs/ext4/inode.c

index d996b44d2265b581be5db2b297065f9a745a9dad..e751715353756d6ad2595641490bb36eca86db9d 100644 (file)
@@ -1054,7 +1054,7 @@ static void count_rsvd(struct inode *inode, ext4_lblk_t lblk, long len,
        end = (end > ext4_es_end(es)) ? ext4_es_end(es) : end;
 
        /* record the first block of the first delonly extent seen */
-       if (rc->first_do_lblk_found == false) {
+       if (!rc->first_do_lblk_found) {
                rc->first_do_lblk = i;
                rc->first_do_lblk_found = true;
        }
index 693a3722337a4d1551b4bea24ada7294d0265053..4a3381eb1bbef7e39da4e8aefc412f2b3b636975 100644 (file)
@@ -2307,7 +2307,7 @@ static int mpage_map_and_submit_buffers(struct mpage_da_data *mpd)
                         * mapping, or maybe the page was submitted for IO.
                         * So we return to call further extent mapping.
                         */
-                       if (err < 0 || map_bh == true)
+                       if (err < 0 || map_bh)
                                goto out;
                        /* Page fully mapped - let IO run! */
                        err = mpage_submit_page(mpd, page);