Re: [PATCH 4/9] btrfs: use assertion helpers for spinning readers

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

 



Hi David,

I love your patch! Yet something to improve:

[auto build test ERROR on kdave/for-next]
[also build test ERROR on next-20190306]
[cannot apply to v5.0]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/David-Sterba/Extent-buffer-locking-cleanups/20190315-231346
base:   https://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux.git for-next
config: i386-randconfig-l1-03152056 (attached as .config)
compiler: gcc-5 (Debian 5.5.0-3) 5.4.1 20171010
reproduce:
        # save the attached .config to linux build tree
        make ARCH=i386 

All errors (new ones prefixed by >>):

   fs//btrfs/locking.c: In function 'btrfs_clear_lock_blocking_read':
>> fs//btrfs/locking.c:97:16: error: 'struct extent_buffer' has no member named 'spinning_readers'
     atomic_inc(&eb->spinning_readers);
                   ^

vim +97 fs//btrfs/locking.c

b4ce94de Chris Mason  2009-02-04   85  
aa12c027 David Sterba 2018-04-04   86  void btrfs_clear_lock_blocking_read(struct extent_buffer *eb)
aa12c027 David Sterba 2018-04-04   87  {
b4ce94de Chris Mason  2009-02-04   88  	/*
aa12c027 David Sterba 2018-04-04   89  	 * No lock is required.  The lock owner may change if we have a read
aa12c027 David Sterba 2018-04-04   90  	 * lock, but it won't change to or away from us.  If we have the write
aa12c027 David Sterba 2018-04-04   91  	 * lock, we are the owner and it'll never change.
b4ce94de Chris Mason  2009-02-04   92  	 */
aa12c027 David Sterba 2018-04-04   93  	if (eb->lock_nested && current->pid == eb->lock_owner)
aa12c027 David Sterba 2018-04-04   94  		return;
aa12c027 David Sterba 2018-04-04   95  	BUG_ON(atomic_read(&eb->blocking_readers) == 0);
aa12c027 David Sterba 2018-04-04   96  	read_lock(&eb->lock);
aa12c027 David Sterba 2018-04-04  @97  	atomic_inc(&eb->spinning_readers);
aa12c027 David Sterba 2018-04-04   98  	/* atomic_dec_and_test implies a barrier */
aa12c027 David Sterba 2018-04-04   99  	if (atomic_dec_and_test(&eb->blocking_readers))
aa12c027 David Sterba 2018-04-04  100  		cond_wake_up_nomb(&eb->read_lock_wq);
aa12c027 David Sterba 2018-04-04  101  }
aa12c027 David Sterba 2018-04-04  102  

:::::: The code at line 97 was first introduced by commit
:::::: aa12c02778a9719283fc3c32cfe5cffb902a7685 btrfs: split btrfs_clear_lock_blocking_rw to read and write helpers

:::::: TO: David Sterba <dsterba@xxxxxxxx>
:::::: CC: David Sterba <dsterba@xxxxxxxx>

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

Attachment: .config.gz
Description: application/gzip


[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux