From: Shiyong Li Date: Sat, 9 Dec 2017 01:38:24 +0000 (-0800) Subject: fs/exfat: do error check for d_splice_alias return X-Git-Tag: MMI-QSB30.62-17~313 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=720451566c14eaf558fdac5707aa841ea806f14e;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git fs/exfat: do error check for d_splice_alias return This patch adds error check in case a Defenderect exFAT SD cards is inserted. Change-Id: I37f6b8716abd556908aad72b18fcc7ac5719766e Signed-off-by: Min Shi Signed-off-by: Shiyong Li Reviewed-on: https://gerrit.mot.com/1102184 SLTApproved: Slta Waiver SME-Granted: SME Approvals Granted Tested-by: Jira Key Reviewed-by: Igor Kovalenko Submit-Approved: Jira Key Reviewed-on: https://gerrit.mot.com/1276885 Reviewed-by: Hua Tan --- diff --git a/fs/exfat/exfat_super.c b/fs/exfat/exfat_super.c index 2e041cdede7e..24159668960f 100644 --- a/fs/exfat/exfat_super.c +++ b/fs/exfat/exfat_super.c @@ -873,7 +873,7 @@ out: } #else dentry = d_splice_alias(inode, dentry); - if (dentry) + if (dentry && !IS_ERR(dentry)) dentry->d_time = dentry->d_parent->d_inode->i_version; #endif DPRINTK("exfat_lookup exited 2\n");