public inbox for linux-btrfs@vger.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Josef Bacik <josef@toxicpanda.com>
Cc: kbuild-all@lists.01.org, linux-btrfs@vger.kernel.org
Subject: [josef-btrfs:locking-rework 16/18] fs/btrfs/locking.c:204:6: sparse: sparse: context imbalance in '__btrfs_tree_lock' - wrong count at exit
Date: Tue, 11 Aug 2020 01:08:04 +0800	[thread overview]
Message-ID: <202008110100.102M9npk%lkp@intel.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 3028 bytes --]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/josef/btrfs-next.git locking-rework
head:   ecc26315fec63c1ce9a1420cb6d9b6e0d0c4d7f5
commit: 061e82bf86d54d981acb307eff1fa114e71c3854 [16/18] btrfs: change our extent buffer lock to a rw_semaphore
config: h8300-randconfig-s032-20200810 (attached as .config)
compiler: h8300-linux-gcc (GCC) 9.3.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # apt-get install sparse
        # sparse version: v0.6.2-141-g19506bc2-dirty
        git checkout 061e82bf86d54d981acb307eff1fa114e71c3854
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=h8300 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>


sparse warnings: (new ones prefixed by >>)

>> fs/btrfs/locking.c:204:6: sparse: sparse: context imbalance in '__btrfs_tree_lock' - wrong count at exit
   fs/btrfs/locking.c:217:6: sparse: sparse: context imbalance in 'btrfs_tree_lock' - wrong count at exit

vim +/__btrfs_tree_lock +204 fs/btrfs/locking.c

b4ce94de9b4d64 Chris Mason  2009-02-04  196  
b4ce94de9b4d64 Chris Mason  2009-02-04  197  /*
061e82bf86d54d Josef Bacik  2020-08-06  198   * __btrfs_tree_lock: Lock for write.
061e82bf86d54d Josef Bacik  2020-08-06  199   * @eb - the eb to lock.
061e82bf86d54d Josef Bacik  2020-08-06  200   * @nest - the nesting to use for the lock.
d4e253bbbc2036 David Sterba 2019-10-16  201   *
061e82bf86d54d Josef Bacik  2020-08-06  202   * Returns with the eb->lock write locked.
b4ce94de9b4d64 Chris Mason  2009-02-04  203   */
b2b79494f64f21 Josef Bacik  2020-08-06 @204  void __btrfs_tree_lock(struct extent_buffer *eb, enum btrfs_lock_nesting nest)
78d933c79cb649 Jules Irenge 2020-03-31  205  	__acquires(&eb->lock)
bd681513fa6f2f Chris Mason  2011-07-16  206  {
34e73cc930a867 Qu Wenruo    2019-04-15  207  	u64 start_ns = 0;
34e73cc930a867 Qu Wenruo    2019-04-15  208  
34e73cc930a867 Qu Wenruo    2019-04-15  209  	if (trace_btrfs_tree_lock_enabled())
34e73cc930a867 Qu Wenruo    2019-04-15  210  		start_ns = ktime_get_ns();
34e73cc930a867 Qu Wenruo    2019-04-15  211  
061e82bf86d54d Josef Bacik  2020-08-06  212  	down_write_nested(&eb->lock, nest);
5b25f70f420076 Arne Jansen  2011-09-13  213  	eb->lock_owner = current->pid;
34e73cc930a867 Qu Wenruo    2019-04-15  214  	trace_btrfs_tree_lock(eb, start_ns);
925baeddc5b076 Chris Mason  2008-06-25  215  }
925baeddc5b076 Chris Mason  2008-06-25  216  

:::::: The code at line 204 was first introduced by commit
:::::: b2b79494f64f21306835ae706656a7b4316a7f4c btrfs: add nesting tags to the locking helpers

:::::: TO: Josef Bacik <josef@toxicpanda.com>
:::::: CC: Josef Bacik <josef@toxicpanda.com>

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

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 24889 bytes --]

                 reply	other threads:[~2020-08-10 17:09 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202008110100.102M9npk%lkp@intel.com \
    --to=lkp@intel.com \
    --cc=josef@toxicpanda.com \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-btrfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox