must_relock++;
}
- if (must_put)
+ if (must_put) {
/* In case we didn't mount with lustre_get_mount -- old method*/
mntput(mds->mds_vfsmnt);
+ lvfs_clear_rdonly(save_dev);
+ }
obd->u.obt.obt_sb = NULL;
ldlm_namespace_free(obd->obd_namespace, obd->obd_force);
}
spin_unlock_bh(&obd->obd_processing_task_lock);
- lvfs_clear_rdonly(save_dev);
-
if (must_relock)
lock_kernel();
static int mgs_cleanup(struct obd_device *obd)
{
struct mgs_obd *mgs = &obd->u.mgs;
- lvfs_sbdev_type save_dev;
ENTRY;
ping_evictor_stop();
if (mgs->mgs_sb == NULL)
RETURN(0);
- save_dev = lvfs_sbdev(mgs->mgs_sb);
ptlrpc_unregister_service(mgs->mgs_service);
cfs_kernel_thread(mgs_ldlm_nsfree, obd->obd_namespace,
CLONE_VM | CLONE_FILES);
- lvfs_clear_rdonly(save_dev);
fsfilt_put_ops(obd->obd_fsops);
struct lustre_sb_info *lsi = s2lsi(sb);
struct obd_device *obd;
struct vfsmount *mnt = lsi->lsi_srv_mnt;
+ lvfs_sbdev_type save_dev;
char *tmpname;
int tmpname_sz;
int lddflags = lsi->lsi_ldd->ldd_flags;
server_stop_mgs(sb);
}
+ save_dev = lvfs_sbdev(sb);
+
/* Clean the mgc and sb */
rc = lustre_common_put_super(sb);
/* FIXME how can I report a failure to umount? */
/* drop the One True Mount */
unlock_mntput(mnt);
+ lvfs_clear_rdonly(save_dev);
/* Stop the servers (MDS, OSS) if no longer needed. We must wait
until the target is really gone so that our type refcount check
must_relock++;
}
- if (must_put)
+ if (must_put) {
/* In case we didn't mount with lustre_get_mount -- old method*/
mntput(filter->fo_vfsmnt);
+ lvfs_clear_rdonly(save_dev);
+ }
obd->u.obt.obt_sb = NULL;
- lvfs_clear_rdonly(save_dev);
-
if (must_relock)
lock_kernel();