CC: kbuild-...@lists.01.org
TO: "Jules, Irenge," <jbi.oct...@gmail.com>
CC: David Sterba <dste...@suse.com>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux.git for-5.8
head:   2166e5edce9ac1edf3b113d6091ef72fcac2d6c4
commit: 78d933c79cb649906577715af15400c7724ca633 [2/133] btrfs: add missing 
annotation for btrfs_tree_lock()
:::::: branch date: 4 days ago
:::::: commit date: 7 days ago
config: x86_64-randconfig-s022-20200601 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-13) 9.3.0
reproduce:
        # apt-get install sparse
        # sparse version: v0.6.1-243-gc100a7ab-dirty
        git checkout 78d933c79cb649906577715af15400c7724ca633
        # 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: kbuild test robot <l...@intel.com>


sparse warnings: (new ones prefixed by >>)

   include/linux/kasan-checks.h:38:20: sparse: sparse: context imbalance in 
'btrfs_set_lock_blocking_read' - unexpected unlock
   fs/btrfs/locking.c:232:41: sparse: sparse: context imbalance in 
'btrfs_set_lock_blocking_write' - unexpected unlock
   fs/btrfs/locking.c:247:6: sparse: sparse: context imbalance in 
'btrfs_tree_read_lock' - different lock contexts for basic block
   fs/btrfs/locking.c:288:5: sparse: sparse: context imbalance in 
'btrfs_tree_read_lock_atomic' - different lock contexts for basic block
   fs/btrfs/locking.c:310:5: sparse: sparse: context imbalance in 
'btrfs_try_tree_read_lock' - different lock contexts for basic block
   fs/btrfs/locking.c:335:5: sparse: sparse: context imbalance in 
'btrfs_try_tree_write_lock' - different lock contexts for basic block
   include/linux/kasan-checks.h:38:20: sparse: sparse: context imbalance in 
'btrfs_tree_read_unlock' - unexpected unlock
   fs/btrfs/locking.c:129:9: sparse: sparse: context imbalance in 
'btrfs_tree_unlock' - unexpected unlock
>> fs/btrfs/locking.c:534:22: sparse: sparse: context imbalance in 
>> 'btrfs_lock_root_node' - wrong count at exit

# 
https://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux.git/commit/?id=78d933c79cb649906577715af15400c7724ca633
git remote add kdave 
https://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux.git
git remote update kdave
git checkout 78d933c79cb649906577715af15400c7724ca633
vim +/btrfs_lock_root_node +534 fs/btrfs/locking.c

b908c334e7a419 David Sterba 2020-02-05  527  
b908c334e7a419 David Sterba 2020-02-05  528  /*
b908c334e7a419 David Sterba 2020-02-05  529   * Loop around taking references 
on and locking the root node of the tree until
b908c334e7a419 David Sterba 2020-02-05  530   * we end up with a lock on the 
root node.
b908c334e7a419 David Sterba 2020-02-05  531   *
b908c334e7a419 David Sterba 2020-02-05  532   * Return: root extent buffer with 
write lock held
b908c334e7a419 David Sterba 2020-02-05  533   */
b908c334e7a419 David Sterba 2020-02-05 @534  struct extent_buffer 
*btrfs_lock_root_node(struct btrfs_root *root)
b908c334e7a419 David Sterba 2020-02-05  535  {
b908c334e7a419 David Sterba 2020-02-05  536     struct extent_buffer *eb;
b908c334e7a419 David Sterba 2020-02-05  537  
b908c334e7a419 David Sterba 2020-02-05  538     while (1) {
b908c334e7a419 David Sterba 2020-02-05  539             eb = 
btrfs_root_node(root);
b908c334e7a419 David Sterba 2020-02-05  540             btrfs_tree_lock(eb);
b908c334e7a419 David Sterba 2020-02-05  541             if (eb == root->node)
b908c334e7a419 David Sterba 2020-02-05  542                     break;
b908c334e7a419 David Sterba 2020-02-05  543             btrfs_tree_unlock(eb);
b908c334e7a419 David Sterba 2020-02-05  544             free_extent_buffer(eb);
b908c334e7a419 David Sterba 2020-02-05  545     }
b908c334e7a419 David Sterba 2020-02-05  546     return eb;
b908c334e7a419 David Sterba 2020-02-05  547  }
b908c334e7a419 David Sterba 2020-02-05  548  

:::::: The code at line 534 was first introduced by commit
:::::: b908c334e7a419e5cd08a45d31284b4a93de3bd7 btrfs: move root node locking 
helpers to locking.c

:::::: TO: David Sterba <dste...@suse.com>
:::::: CC: David Sterba <dste...@suse.com>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-...@lists.01.org

Attachment: .config.gz
Description: application/gzip

_______________________________________________
kbuild mailing list -- kbuild@lists.01.org
To unsubscribe send an email to kbuild-le...@lists.01.org

Reply via email to