From: alex Date: Wed, 25 Feb 2009 19:51:15 +0000 (+0000) Subject: - more error handling in ldiskfs osd X-Git-Tag: GIT_EPOCH_B_HD_KDMU~2^4~161 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=931a2371586afbc838b4b7ab0044b2aecd4d3026;p=fs%2Flustre-release.git - more error handling in ldiskfs osd --- diff --git a/lustre/osd/osd_handler.c b/lustre/osd/osd_handler.c index 7a6dcdd..0219aaa 100644 --- a/lustre/osd/osd_handler.c +++ b/lustre/osd/osd_handler.c @@ -3665,8 +3665,11 @@ static int osd_mount(const struct lu_env *env, o->od_mnt = ll_kern_mount("ldiskfs", s_flags, dev, (void *)options); /* XXX: error handling */ - if (IS_ERR(o->od_mnt)) - GOTO(out, rc = PTR_ERR(o->od_mnt)); + if (IS_ERR(o->od_mnt)) { + rc = PTR_ERR(o->od_mnt); + o->od_mnt = NULL; + GOTO(out, rc); + } o->od_fsops = fsfilt_get_ops(mt_str(LDD_MT_LDISKFS)); LASSERT(o->od_fsops); @@ -3688,8 +3691,10 @@ static struct lu_device *osd_device_fini(const struct lu_env *env, int rc; ENTRY; - shrink_dcache_sb(osd_sb(osd_dev(d))); - osd_sync(env, lu2dt_dev(d)); + if (osd_dev(d)->od_mnt) { + shrink_dcache_sb(osd_sb(osd_dev(d))); + osd_sync(env, lu2dt_dev(d)); + } rc = osd_procfs_fini(osd_dev(d)); if (rc) {