summaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorTony Lin <tony.lin@freescale.com>2011-11-17 17:49:15 +0800
committerJason Liu <r64343@freescale.com>2012-01-09 21:07:10 +0800
commitaaa2f05eca5e5658d83c4a61efdfc539109eb15f (patch)
treecd3a97062dc54fb8f54c899df51cc00c3b03d5ca /fs
parentbb7593739443553f5c88a2574236257bc4068f34 (diff)
ENGR00162198 [MX6q_ARM2]filesystem: Kernel dump if unplug SD card during bonnie
add pointer check before accesssing to fix following problem staErXtT 3'-efms. .(.mmcblk1p2): error: remounting filesystem read-only Unable to handle kernel NULL pointer dereference at virtual address 00000010 pgd = df334000 [00000010] *pgd=71e85831, *pte=00000000, *ppte=00000000 Internal error: Oops: 17 [#1] PREEMPT SMP last sysfs file: /sys/devices/platform/sdhci-esdhc-imx.2/mmc_host/mmc1/ mmc1:b368/serial Modules linked in: ahci_platform ov3640_camera libahci libata CPU: 1 Not tainted (2.6.38-daily-00808-g43b3e87 #1) PC is at __mark_inode_dirty+0xc8/0x1b4 LR is at __mark_inode_dirty+0xb8/0x1b4 pc : [<800f7418>] lr : [<800f7408>] psr: 20000013 sp : df14dde0 ip : 00000062 fp : 00000000 r10: 003d2000 r9 : df14df38 r8 : 00000000 r7 : 4ec22acb r6 : 00000003 r5 : 00000000 r4 : e028c720 r3 : 00000001 r2 : 00000065 r1 : 804fe50c r0 : 00000001 Signed-off-by Tony Lin <tony.lin@freescale.com>
Diffstat (limited to 'fs')
-rw-r--r--fs/fs-writeback.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/fs-writeback.c b/fs/fs-writeback.c
index fe190a8b0bc8..5df6157e5bce 100644
--- a/fs/fs-writeback.c
+++ b/fs/fs-writeback.c
@@ -1082,6 +1082,8 @@ void __mark_inode_dirty(struct inode *inode, int flags)
if (!was_dirty) {
bool wakeup_bdi = false;
bdi = inode_to_bdi(inode);
+ if (!bdi)
+ goto out;
if (bdi_cap_writeback_dirty(bdi)) {
WARN(!test_bit(BDI_registered, &bdi->state),