CC: [email protected]
CC: [email protected]
TO: "Bob, Peterson," <[email protected]>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2.git 
for-next.bob
head:   a5841b1c95521b546cc11e034849a51160502a1e
commit: e78eb3e002b72e125a0f0944045ae6c0d539aa11 [1/7] gfs2: Add new sysfs file 
for gfs2 status
:::::: branch date: 21 hours ago
:::::: commit date: 22 hours ago
config: x86_64-randconfig-s021-20200603 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-13) 9.3.0
reproduce:
        # apt-get install sparse
        # sparse version: v0.6.1-244-g0ee050a8-dirty
        git checkout e78eb3e002b72e125a0f0944045ae6c0d539aa11
        # save the attached .config to linux build tree
        make W=1 C=1 ARCH=x86_64 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__'

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


sparse warnings: (new ones prefixed by >>)

>> fs/gfs2/sys.c:66:12: sparse: sparse: context imbalance in 'count_trans_list' 
>> - different lock contexts for basic block
>> fs/gfs2/sys.c:90:12: sparse: sparse: context imbalance in 'count_list' - 
>> different lock contexts for basic block

# 
https://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2.git/commit/?id=e78eb3e002b72e125a0f0944045ae6c0d539aa11
git remote add gfs2 
https://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2.git
git remote update gfs2
git checkout e78eb3e002b72e125a0f0944045ae6c0d539aa11
vim +/count_trans_list +66 fs/gfs2/sys.c

b3b94faa5fe596 David Teigland 2006-01-16   65  
e78eb3e002b72e Bob Peterson   2020-05-22  @66  static int 
count_trans_list(struct gfs2_sbd *sdp, struct list_head *head,
e78eb3e002b72e Bob Peterson   2020-05-22   67                       int *ail1, 
int *ail2)
e78eb3e002b72e Bob Peterson   2020-05-22   68  {
e78eb3e002b72e Bob Peterson   2020-05-22   69   struct gfs2_trans *tr;
e78eb3e002b72e Bob Peterson   2020-05-22   70   struct gfs2_bufdata *bd;
e78eb3e002b72e Bob Peterson   2020-05-22   71   int unlock_spin, trans = 0;
e78eb3e002b72e Bob Peterson   2020-05-22   72  
e78eb3e002b72e Bob Peterson   2020-05-22   73   *ail1 = *ail2 = 0;
e78eb3e002b72e Bob Peterson   2020-05-22   74   unlock_spin = 
spin_trylock(&sdp->sd_ail_lock);
e78eb3e002b72e Bob Peterson   2020-05-22   75  
e78eb3e002b72e Bob Peterson   2020-05-22   76   list_for_each_entry(tr, head, 
tr_list) {
e78eb3e002b72e Bob Peterson   2020-05-22   77           trans++;
e78eb3e002b72e Bob Peterson   2020-05-22   78           list_for_each_entry(bd, 
&tr->tr_ail1_list, bd_ail_st_list)
e78eb3e002b72e Bob Peterson   2020-05-22   79                   (*ail1)++;
e78eb3e002b72e Bob Peterson   2020-05-22   80           list_for_each_entry(bd, 
&tr->tr_ail2_list, bd_ail_st_list)
e78eb3e002b72e Bob Peterson   2020-05-22   81                   (*ail2)++;
e78eb3e002b72e Bob Peterson   2020-05-22   82   }
e78eb3e002b72e Bob Peterson   2020-05-22   83  
e78eb3e002b72e Bob Peterson   2020-05-22   84   if (unlock_spin)
e78eb3e002b72e Bob Peterson   2020-05-22   85           
spin_unlock(&sdp->sd_ail_lock);
e78eb3e002b72e Bob Peterson   2020-05-22   86  
e78eb3e002b72e Bob Peterson   2020-05-22   87   return trans;
e78eb3e002b72e Bob Peterson   2020-05-22   88  }
e78eb3e002b72e Bob Peterson   2020-05-22   89  
e78eb3e002b72e Bob Peterson   2020-05-22  @90  static int count_list(struct 
gfs2_sbd *sdp, struct list_head *head)
e78eb3e002b72e Bob Peterson   2020-05-22   91  {
e78eb3e002b72e Bob Peterson   2020-05-22   92   int unlock_spin, count = 0;
e78eb3e002b72e Bob Peterson   2020-05-22   93   struct gfs2_bufdata *bd;
e78eb3e002b72e Bob Peterson   2020-05-22   94  
e78eb3e002b72e Bob Peterson   2020-05-22   95   unlock_spin = 
spin_trylock(&sdp->sd_log_lock);
e78eb3e002b72e Bob Peterson   2020-05-22   96  
e78eb3e002b72e Bob Peterson   2020-05-22   97   list_for_each_entry(bd, head, 
bd_list)
e78eb3e002b72e Bob Peterson   2020-05-22   98           count++;
e78eb3e002b72e Bob Peterson   2020-05-22   99   if (unlock_spin)
e78eb3e002b72e Bob Peterson   2020-05-22  100           
spin_unlock(&sdp->sd_log_lock);
e78eb3e002b72e Bob Peterson   2020-05-22  101  
e78eb3e002b72e Bob Peterson   2020-05-22  102   return count;
e78eb3e002b72e Bob Peterson   2020-05-22  103  }
e78eb3e002b72e Bob Peterson   2020-05-22  104  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/[email protected]

Attachment: .config.gz
Description: application/gzip

_______________________________________________
kbuild mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to