[tytso-ext4:test 112/113] fs/ext4/mballoc.c:2598:6-9: duplicated argument to && or || (fwd)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



There is a double test of grp on line 2598.

julia

---------- Forwarded message ----------
Date: Mon, 1 May 2023 01:53:12 +0800
From: kernel test robot <lkp@xxxxxxxxx>
To: oe-kbuild@xxxxxxxxxxxxxxx
Cc: lkp@xxxxxxxxx, Julia Lawall <julia.lawall@xxxxxxxx>
Subject: [tytso-ext4:test 112/113] fs/ext4/mballoc.c:2598:6-9: duplicated
    argument to && or ||

BCC: lkp@xxxxxxxxx
CC: oe-kbuild-all@xxxxxxxxxxxxxxx
CC: linux-ext4@xxxxxxxxxxxxxxx
TO: "Theodore Ts'o" <tytso@xxxxxxx>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4.git test
head:   493cc71f24795ab9afc311649f5d2c23f652fb1e
commit: b9d6ed27a28439d79a90058587b2e3eeb2fcab73 [112/113] ext4: DO NOT MERGE: allow ext4_get_group_info() to fail
:::::: branch date: 22 hours ago
:::::: commit date: 25 hours ago
config: i386-randconfig-c021 (https://download.01.org/0day-ci/archive/20230501/202305010128.IfRIXw8H-lkp@xxxxxxxxx/config)
compiler: gcc-11 (Debian 11.3.0-12) 11.3.0

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@xxxxxxxxx>
| Reported-by: Julia Lawall <julia.lawall@xxxxxxxx>
| Link: https://lore.kernel.org/r/202305010128.IfRIXw8H-lkp@xxxxxxxxx/

cocci warnings: (new ones prefixed by >>)
>> fs/ext4/mballoc.c:2598:6-9: duplicated argument to && or ||

vim +2598 fs/ext4/mballoc.c

cfd73237722135 Alex Zhuravlev 2020-04-21  2572
cfd73237722135 Alex Zhuravlev 2020-04-21  2573  /*
cfd73237722135 Alex Zhuravlev 2020-04-21  2574   * Prefetching reads the block bitmap into the buffer cache; but we
cfd73237722135 Alex Zhuravlev 2020-04-21  2575   * need to make sure that the buddy bitmap in the page cache has been
cfd73237722135 Alex Zhuravlev 2020-04-21  2576   * initialized.  Note that ext4_mb_init_group() will block if the I/O
cfd73237722135 Alex Zhuravlev 2020-04-21  2577   * is not yet completed, or indeed if it was not initiated by
cfd73237722135 Alex Zhuravlev 2020-04-21  2578   * ext4_mb_prefetch did not start the I/O.
cfd73237722135 Alex Zhuravlev 2020-04-21  2579   *
cfd73237722135 Alex Zhuravlev 2020-04-21  2580   * TODO: We should actually kick off the buddy bitmap setup in a work
cfd73237722135 Alex Zhuravlev 2020-04-21  2581   * queue when the buffer I/O is completed, so that we don't block
cfd73237722135 Alex Zhuravlev 2020-04-21  2582   * waiting for the block allocation bitmap read to finish when
cfd73237722135 Alex Zhuravlev 2020-04-21  2583   * ext4_mb_prefetch_fini is called from ext4_mb_regular_allocator().
cfd73237722135 Alex Zhuravlev 2020-04-21  2584   */
3d392b2676bf31 Theodore Ts'o  2020-07-17  2585  void ext4_mb_prefetch_fini(struct super_block *sb, ext4_group_t group,
cfd73237722135 Alex Zhuravlev 2020-04-21  2586  			   unsigned int nr)
cfd73237722135 Alex Zhuravlev 2020-04-21  2587  {
22fab984025313 Kemeng Shi     2023-03-04  2588  	struct ext4_group_desc *gdp;
22fab984025313 Kemeng Shi     2023-03-04  2589  	struct ext4_group_info *grp;
cfd73237722135 Alex Zhuravlev 2020-04-21  2590
22fab984025313 Kemeng Shi     2023-03-04  2591  	while (nr-- > 0) {
cfd73237722135 Alex Zhuravlev 2020-04-21  2592  		if (!group)
cfd73237722135 Alex Zhuravlev 2020-04-21  2593  			group = ext4_get_groups_count(sb);
cfd73237722135 Alex Zhuravlev 2020-04-21  2594  		group--;
22fab984025313 Kemeng Shi     2023-03-04  2595  		gdp = ext4_get_group_desc(sb, group, NULL);
cfd73237722135 Alex Zhuravlev 2020-04-21  2596  		grp = ext4_get_group_info(sb, group);
cfd73237722135 Alex Zhuravlev 2020-04-21  2597
b9d6ed27a28439 Theodore Ts'o  2023-04-29 @2598  		if (grp && grp && EXT4_MB_GRP_NEED_INIT(grp) &&
cfd73237722135 Alex Zhuravlev 2020-04-21  2599  		    ext4_free_group_clusters(sb, gdp) > 0 &&
cfd73237722135 Alex Zhuravlev 2020-04-21  2600  		    !(ext4_has_group_desc_csum(sb) &&
cfd73237722135 Alex Zhuravlev 2020-04-21  2601  		      (gdp->bg_flags & cpu_to_le16(EXT4_BG_BLOCK_UNINIT)))) {
cfd73237722135 Alex Zhuravlev 2020-04-21  2602  			if (ext4_mb_init_group(sb, group, GFP_NOFS))
cfd73237722135 Alex Zhuravlev 2020-04-21  2603  				break;
cfd73237722135 Alex Zhuravlev 2020-04-21  2604  		}
cfd73237722135 Alex Zhuravlev 2020-04-21  2605  	}
cfd73237722135 Alex Zhuravlev 2020-04-21  2606  }
cfd73237722135 Alex Zhuravlev 2020-04-21  2607

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests



[Index of Archives]     [Reiser Filesystem Development]     [Ceph FS]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite National Park]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]     [Linux Media]

  Powered by Linux