linux/fs/nilfs2
Ryusuke Konishi d611b22f1a nilfs2: fix oops due to a bad aops initialization
Nilfs in 2.6.39-rc1 hit the following oops:

 BUG: unable to handle kernel NULL pointer dereference at 0000000000000048
 IP: [<ffffffff810ac235>] try_to_release_page+0x2a/0x3d
 PGD 234cb6067 PUD 234c72067 PMD 0
 Oops: 0000 [#1] SMP
 <snip>
 Process truncate (pid: 10995, threadinfo ffff8802353c2000, task ffff880234cfa000)
 Stack:
  ffff8802333c77b8 ffffffff810b64b0 0000000000003802 ffffffffa0052cca
  0000000000000000 ffff8802353c3b58 0000000000000000 ffff8802353c3b58
  0000000000000001 0000000000000000 ffffea0007b92308 ffffea0007b92308
 Call Trace:
  [<ffffffff810b64b0>] ? invalidate_inode_pages2_range+0x15f/0x273
  [<ffffffffa0052cca>] ? nilfs_palloc_get_block+0x2d/0xaf [nilfs2]
  [<ffffffff810589e7>] ? bit_waitqueue+0x14/0xa1
  [<ffffffff81058ab1>] ? wake_up_bit+0x10/0x20
  [<ffffffffa00433fd>] ? nilfs_forget_buffer+0x66/0x7a [nilfs2]
  [<ffffffffa00467b8>] ? nilfs_btree_concat_left+0x5c/0x77 [nilfs2]
  [<ffffffffa00471fc>] ? nilfs_btree_delete+0x395/0x3cf [nilfs2]
  [<ffffffffa00449a3>] ? nilfs_bmap_do_delete+0x6e/0x79 [nilfs2]
  [<ffffffffa0045845>] ? nilfs_btree_last_key+0x14b/0x15e [nilfs2]
  [<ffffffffa00449dd>] ? nilfs_bmap_truncate+0x2f/0x83 [nilfs2]
  [<ffffffffa0044ab2>] ? nilfs_bmap_last_key+0x35/0x62 [nilfs2]
  [<ffffffffa003e99b>] ? nilfs_truncate_bmap+0x6b/0xc7 [nilfs2]
  [<ffffffffa003ee4a>] ? nilfs_truncate+0x79/0xe4 [nilfs2]
  [<ffffffff810b6c00>] ? vmtruncate+0x33/0x3b
  [<ffffffffa003e8f1>] ? nilfs_setattr+0x4d/0x8c [nilfs2]
  [<ffffffff81026106>] ? do_page_fault+0x31b/0x356
  [<ffffffff810f9d61>] ? notify_change+0x17d/0x262
  [<ffffffff810e5046>] ? do_truncate+0x65/0x80
  [<ffffffff810e52af>] ? sys_ftruncate+0xf1/0xf6
  [<ffffffff8132c012>] ? system_call_fastpath+0x16/0x1b
 Code: c3 48 83 ec 08 48 8b 17 48 8b 47 18 80 e2 01 75 04 0f 0b eb fe 48 8b 17 80 e6 20 74 05 31 c0 41 59 c3 48 85 c0 74 11 48 8b 40 58
  8b 40 48 48 85 c0 74 04 41 58 ff e0 59 e9 b1 b5 05 00 41 54
 RIP  [<ffffffff810ac235>] try_to_release_page+0x2a/0x3d
  RSP <ffff8802353c3b08>
 CR2: 0000000000000048

This oops was brought in by the change "block: remove per-queue
plugging" (commit: 7eaceaccab).  It initializes mapping->a_ops
with a NULL pointer for some pages in nilfs (e.g. btree node pages),
but mm code doesn't NULL pointer checks against mapping->a_ops. (the
check is done for each callback function)

This corrects the aops initialization and fixes the oops.

Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
Acked-by: Jens Axboe <jaxboe@fusionio.com>
2011-03-30 17:39:25 +09:00
..
alloc.c nilfs2: add free entries count only if clear bit operation succeeded 2011-03-08 14:58:04 +09:00
alloc.h nilfs2: use little-endian bitops 2011-03-23 19:46:18 -07:00
bmap.c nilfs2: get rid of nilfs_sb_info structure 2011-03-09 11:54:26 +09:00
bmap.h nilfs2: record used amount of each checkpoint in checkpoint list 2011-03-08 14:58:31 +09:00
btnode.c Merge branch 'for-2.6.39/stack-plug' into for-2.6.39/core 2011-03-10 08:58:35 +01:00
btnode.h mm: prevent concurrent unmap_mapping_range() on the same inode 2011-02-23 19:52:52 -08:00
btree.c nilfs2: record used amount of each checkpoint in checkpoint list 2011-03-08 14:58:31 +09:00
btree.h nilfs2: get rid of nilfs_bmap_union 2010-07-23 10:02:14 +09:00
cpfile.c nilfs2: see state of root dentry for mount check of snapshots 2010-10-23 09:24:38 +09:00
cpfile.h nilfs2: use iget for all metadata files 2010-10-23 09:24:38 +09:00
dat.c nilfs2: fix typo in comment of nilfs_dat_move function 2010-11-24 12:51:48 +09:00
dat.h nilfs2: use iget for all metadata files 2010-10-23 09:24:38 +09:00
dir.c nilfs2: add compat ioctl 2011-03-08 14:58:30 +09:00
direct.c nilfs2: record used amount of each checkpoint in checkpoint list 2011-03-08 14:58:31 +09:00
direct.h nilfs2: get rid of nilfs_bmap_union 2010-07-23 10:02:14 +09:00
export.h nilfs2: make snapshots in checkpoint tree exportable 2010-10-23 09:24:34 +09:00
file.c nilfs2: fix data loss in mmap page write for hole blocks 2011-03-30 10:45:31 +09:00
gcinode.c block: remove per-queue plugging 2011-03-10 08:52:07 +01:00
ifile.c nilfs2: call nilfs_error inside bmap routines 2011-01-10 14:05:45 +09:00
ifile.h nilfs2: use iget for all metadata files 2010-10-23 09:24:38 +09:00
inode.c Merge branch 'for-2.6.39/core' of git://git.kernel.dk/linux-2.6-block 2011-03-24 10:16:26 -07:00
ioctl.c userns: rename is_owner_or_cap to inode_owner_or_capable 2011-03-23 19:47:13 -07:00
Kconfig Revert "task_struct: make journal_info conditional" 2009-12-17 13:23:24 -08:00
Makefile nilfs2: get rid of GCDAT inode 2010-10-23 09:24:38 +09:00
mdt.c Merge branch 'for-2.6.39/stack-plug' into for-2.6.39/core 2011-03-10 08:58:35 +01:00
mdt.h nilfs2: get rid of nilfs_sb_info structure 2011-03-09 11:54:26 +09:00
namei.c nilfs2: get rid of nilfs_sb_info structure 2011-03-09 11:54:26 +09:00
nilfs.h nilfs2: get rid of nilfs_sb_info structure 2011-03-09 11:54:26 +09:00
page.c nilfs2: fix oops due to a bad aops initialization 2011-03-30 17:39:25 +09:00
page.h Merge branch 'for-2.6.39/stack-plug' into for-2.6.39/core 2011-03-10 08:58:35 +01:00
recovery.c nilfs2: use sb instance instead of nilfs_sb_info struct 2011-03-09 11:05:08 +09:00
segbuf.c block: kill off REQ_UNPLUG 2011-03-10 08:52:27 +01:00
segbuf.h nilfs2: get rid of macros for segment summary information 2010-07-23 10:02:09 +09:00
segment.c nilfs2: get rid of nilfs_sb_info structure 2011-03-09 11:54:26 +09:00
segment.h nilfs2: get rid of nilfs_sb_info structure 2011-03-09 11:54:26 +09:00
sufile.c nilfs2: get rid of mi_nilfs back pointer to nilfs object 2010-10-23 09:24:38 +09:00
sufile.h nilfs2: get rid of mi_nilfs back pointer to nilfs object 2010-10-23 09:24:38 +09:00
super.c nilfs2: get rid of nilfs_sb_info structure 2011-03-09 11:54:26 +09:00
the_nilfs.c nilfs2: use sb instance instead of nilfs_sb_info struct 2011-03-09 11:05:08 +09:00
the_nilfs.h nilfs2: get rid of nilfs_sb_info structure 2011-03-09 11:54:26 +09:00