mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-11 07:03:09 -04:00
exfat:fixed fs_error access null pointer
when exfat unmounted, but fs_error maybe callbacked by block layer still.so just check whether the sb and sb_fs_info was released. Change-Id: I30f55a2f3a20cbaecccbcf12d143590a02d1bf19 Signed-off-by: yuedl1 <yuedl1@lenovo.com> Reviewed-on: https://gerrit.mot.com/1708296 Tested-by: Jira Key SLTApproved: Slta Waiver SME-Granted: SME Approvals Granted Reviewed-by: Zhenxin Xi <xizx@motorola.com> Submit-Approved: Jira Key
This commit is contained in:
parent
96a93628cd
commit
48b1ef558f
1 changed files with 8 additions and 2 deletions
|
|
@ -1753,8 +1753,14 @@ void fs_sync(struct super_block *sb, s32 do_sync)
|
|||
|
||||
void fs_error(struct super_block *sb)
|
||||
{
|
||||
struct exfat_mount_options *opts = &EXFAT_SB(sb)->options;
|
||||
struct exfat_sb_info *sbi = EXFAT_SB(sb);
|
||||
struct exfat_mount_options *opts;
|
||||
struct exfat_sb_info *sbi;
|
||||
if ( sb == NULL || EXFAT_SB(sb)== NULL) {
|
||||
printk(KERN_ERR "[EXFAT] filesystem maybe unmounted!!!\n");
|
||||
return;
|
||||
}
|
||||
opts = &EXFAT_SB(sb)->options;
|
||||
sbi = EXFAT_SB(sb);
|
||||
|
||||
if (opts->errors == EXFAT_ERRORS_PANIC)
|
||||
panic("[EXFAT] Filesystem panic from previous error\n");
|
||||
|
|
|
|||
Loading…
Reference in a new issue