CC: [email protected]
BCC: [email protected]
CC: "Darrick J. Wong" <[email protected]>
CC: [email protected]
TO: "Darrick J. Wong" <[email protected]>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux.git 
vectorized-scrub
head:   bd756ef7af68274b79308166ee64949d288be861
commit: a15a0bd61ce19d35585a45930a3ab5a84256bf3e [192/396] xfs: introduce a 
swap-extent log intent item
:::::: branch date: 12 hours ago
:::::: commit date: 12 hours ago
config: i386-randconfig-c021 
(https://download.01.org/0day-ci/archive/20220413/[email protected]/config)
compiler: gcc-11 (Debian 11.2.0-19) 11.2.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <[email protected]>
Reported-by: Julia Lawall <[email protected]>


cocci warnings: (new ones prefixed by >>)
>> fs/xfs/xfs_swapext_item.c:56:5-24: atomic_dec_and_test variation before 
>> object free at line 57.

vim +56 fs/xfs/xfs_swapext_item.c

a15a0bd61ce19d Darrick J. Wong 2022-01-06  43  
a15a0bd61ce19d Darrick J. Wong 2022-01-06  44  /*
a15a0bd61ce19d Darrick J. Wong 2022-01-06  45   * Freeing the SXI requires that 
we remove it from the AIL if it has already
a15a0bd61ce19d Darrick J. Wong 2022-01-06  46   * been placed there. However, 
the SXI may not yet have been placed in the AIL
a15a0bd61ce19d Darrick J. Wong 2022-01-06  47   * when called by 
xfs_sxi_release() from SXD processing due to the ordering of
a15a0bd61ce19d Darrick J. Wong 2022-01-06  48   * committed vs unpin operations 
in bulk insert operations. Hence the reference
a15a0bd61ce19d Darrick J. Wong 2022-01-06  49   * count to ensure only the last 
caller frees the SXI.
a15a0bd61ce19d Darrick J. Wong 2022-01-06  50   */
a15a0bd61ce19d Darrick J. Wong 2022-01-06  51  STATIC void
a15a0bd61ce19d Darrick J. Wong 2022-01-06  52  xfs_sxi_release(
a15a0bd61ce19d Darrick J. Wong 2022-01-06  53   struct xfs_sxi_log_item 
*sxi_lip)
a15a0bd61ce19d Darrick J. Wong 2022-01-06  54  {
a15a0bd61ce19d Darrick J. Wong 2022-01-06  55   
ASSERT(atomic_read(&sxi_lip->sxi_refcount) > 0);
a15a0bd61ce19d Darrick J. Wong 2022-01-06 @56   if 
(atomic_dec_and_test(&sxi_lip->sxi_refcount)) {
a15a0bd61ce19d Darrick J. Wong 2022-01-06 @57           
xfs_trans_ail_delete(&sxi_lip->sxi_item, SHUTDOWN_LOG_IO_ERROR);
a15a0bd61ce19d Darrick J. Wong 2022-01-06  58           
xfs_sxi_item_free(sxi_lip);
a15a0bd61ce19d Darrick J. Wong 2022-01-06  59   }
a15a0bd61ce19d Darrick J. Wong 2022-01-06  60  }
a15a0bd61ce19d Darrick J. Wong 2022-01-06  61  

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp
_______________________________________________
kbuild mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to