android_kernel_xiaomi_sm8350/fs/nilfs2
Ryusuke Konishi b1f1b8ce0a nilfs2: fix preempt count underflow in nilfs_btnode_prepare_change_key
This will fix the following preempt count underflow reported from
users with the title "[NILFS users] segctord problem" (Message-ID:
<949415.6494.qm@web58808.mail.re1.yahoo.com> and Message-ID:
<debc30fc0908270825v747c1734xa59126623cfd5b05@mail.gmail.com>):

 WARNING: at kernel/sched.c:4890 sub_preempt_count+0x95/0xa0()
 Hardware name: HP Compaq 6530b (KR980UT#ABC)
 Modules linked in: bridge stp llc bnep rfcomm l2cap xfs exportfs nilfs2 cowloop loop vboxnetadp vboxnetflt vboxdrv btusb bluetooth uvcvideo videodev v4l1_compat v4l2_compat_ioctl32 arc4 snd_hda_codec_analog ecb iwlagn iwlcore rfkill lib80211 mac80211 snd_hda_intel snd_hda_codec ehci_hcd uhci_hcd usbcore snd_hwdep snd_pcm tg3 cfg80211 psmouse snd_timer joydev libphy ohci1394 snd_page_alloc hp_accel lis3lv02d ieee1394 led_class i915 drm i2c_algo_bit video backlight output i2c_core dm_crypt dm_mod
 Pid: 4197, comm: segctord Not tainted 2.6.30-gentoo-r4-64 #7
 Call Trace:
  [<ffffffff8023fa05>] ? sub_preempt_count+0x95/0xa0
  [<ffffffff802470f8>] warn_slowpath_common+0x78/0xd0
  [<ffffffff8024715f>] warn_slowpath_null+0xf/0x20
  [<ffffffff8023fa05>] sub_preempt_count+0x95/0xa0
  [<ffffffffa04ce4db>] nilfs_btnode_prepare_change_key+0x11b/0x190 [nilfs2]
  [<ffffffffa04d01ad>] nilfs_btree_assign_p+0x19d/0x1e0 [nilfs2]
  [<ffffffffa04d10ad>] nilfs_btree_assign+0xbd/0x130 [nilfs2]
  [<ffffffffa04cead7>] nilfs_bmap_assign+0x47/0x70 [nilfs2]
  [<ffffffffa04d9bc6>] nilfs_segctor_do_construct+0x956/0x20f0 [nilfs2]
  [<ffffffff805ac8e2>] ? _spin_unlock_irqrestore+0x12/0x40
  [<ffffffff803c06e0>] ? __up_write+0xe0/0x150
  [<ffffffff80262959>] ? up_write+0x9/0x10
  [<ffffffffa04ce9f3>] ? nilfs_bmap_test_and_clear_dirty+0x43/0x60 [nilfs2]
  [<ffffffffa04cd627>] ? nilfs_mdt_fetch_dirty+0x27/0x60 [nilfs2]
  [<ffffffffa04db5fc>] nilfs_segctor_construct+0x8c/0xd0 [nilfs2]
  [<ffffffffa04dc3dc>] nilfs_segctor_thread+0x15c/0x3a0 [nilfs2]
  [<ffffffffa04dbe20>] ? nilfs_construction_timeout+0x0/0x10 [nilfs2]
  [<ffffffff80252633>] ? add_timer+0x13/0x20
  [<ffffffff802370da>] ? __wake_up_common+0x5a/0x90
  [<ffffffff8025e960>] ? autoremove_wake_function+0x0/0x40
  [<ffffffffa04dc280>] ? nilfs_segctor_thread+0x0/0x3a0 [nilfs2]
  [<ffffffffa04dc280>] ? nilfs_segctor_thread+0x0/0x3a0 [nilfs2]
  [<ffffffff8025e556>] kthread+0x56/0x90
  [<ffffffff8020cdea>] child_rip+0xa/0x20
  [<ffffffff8025e500>] ? kthread+0x0/0x90
  [<ffffffff8020cde0>] ? child_rip+0x0/0x20

This problem was caused due to a missing radix_tree_preload() call in
the retry path of nilfs_btnode_prepare_change_key() function.

Reported-by: Eric A <eric225125@yahoo.com>
Reported-by: Jerome Poulin <jeromepoulin@gmail.com>
Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
Tested-by: Jerome Poulin <jeromepoulin@gmail.com>
Cc: stable@kernel.org
2009-08-31 12:03:06 +09:00
..
alloc.c
alloc.h
bmap_union.h
bmap.c nilfs2: fix lockdep warning between regular file and inode file 2009-07-05 10:44:20 +09:00
bmap.h nilfs2: support contiguous lookup of blocks 2009-06-10 23:41:12 +09:00
btnode.c nilfs2: fix preempt count underflow in nilfs_btnode_prepare_change_key 2009-08-31 12:03:06 +09:00
btnode.h nilfs2: use device's backing_dev_info for btree node caches 2009-06-10 23:41:12 +09:00
btree.c nilfs2: support contiguous lookup of blocks 2009-06-10 23:41:12 +09:00
btree.h nilfs2: remove nilfs_btree_operations from btree mapping 2009-06-10 23:41:11 +09:00
cpfile.c nilfs2: fix disorder in cp count on error during deleting checkpoints 2009-07-05 10:44:20 +09:00
cpfile.h nilfs2: allow future expansion of metadata read out via get info ioctl 2009-06-10 23:41:11 +09:00
dat.c nilfs2: fix incorrect KERN_CRIT messages in case of write failures 2009-07-05 10:44:20 +09:00
dat.h nilfs2: allow future expansion of metadata read out via get info ioctl 2009-06-10 23:41:11 +09:00
dir.c headers: smp_lock.h redux 2009-07-12 12:22:34 -07:00
direct.c nilfs2: support contiguous lookup of blocks 2009-06-10 23:41:12 +09:00
direct.h nilfs2: remove nilfs_direct_operations from direct mapping 2009-06-10 23:41:11 +09:00
file.c
gcdat.c
gcinode.c nilfs2: add sync_page method to page caches of meta data 2009-06-10 23:41:12 +09:00
ifile.c
ifile.h
inode.c switch nilfs2 to inode->i_acl 2009-06-24 08:17:05 -04:00
ioctl.c nilfs2: allow future expansion of metadata read out via get info ioctl 2009-06-10 23:41:11 +09:00
Kconfig fs/Kconfig: move nilfs2 out 2009-07-14 12:34:17 +09:00
Makefile
mdt.c nilfs2: fix missing unlock in error path of nilfs_mdt_write_page 2009-08-02 22:24:15 +09:00
mdt.h
namei.c
nilfs.h switch nilfs2 to inode->i_acl 2009-06-24 08:17:05 -04:00
page.c
page.h
recovery.c nilfs2: remove header file for segment list operations 2009-06-10 23:41:09 +09:00
sb.h nilfs2: simplify remaining sget() use 2009-06-11 21:36:18 -04:00
segbuf.c nilfs2: set bio unplug flag for the last bio in segment 2009-06-10 23:41:11 +09:00
segbuf.h
segment.c nilfs2: fix oops due to inconsistent state in page with discrete b-tree nodes 2009-08-01 22:48:32 +09:00
segment.h nilfs2: remove header file for segment list operations 2009-06-10 23:41:09 +09:00
sufile.c nilfs2: allow future expansion of metadata read out via get info ioctl 2009-06-10 23:41:11 +09:00
sufile.h nilfs2: allow future expansion of metadata read out via get info ioctl 2009-06-10 23:41:11 +09:00
super.c nilfs2: missing a read lock for segment writer in nilfs_attach_checkpoint() 2009-08-18 17:32:27 +09:00
the_nilfs.c Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ryusuke/nilfs2 2009-06-15 09:13:49 -07:00
the_nilfs.h nilfs2: fix oopses with doubly mounted snapshots 2009-08-19 02:10:13 +09:00