src/aiori-CEPHFS: Add option checks before init

Signed-off-by: Mark Nelson <mnelson@redhat.com>
master
Mark Nelson 2020-05-28 19:32:13 -05:00
parent 2711ae5257
commit efc6d49832
1 changed files with 6 additions and 0 deletions

View File

@ -125,6 +125,12 @@ static option_help * CEPHFS_options(){
static void CEPHFS_Init()
{
/* Short circuit if the options haven't been filled yet. */
if (!o.user || !o.conf || !o.prefix) {
WARN("CEPHFS_Init() called before options have been populated!");
return;
}
/* Short circuit if the mount handle already exists */
if (cmount) {
return;