The mgs teardown code gets invoked in the failure case but assumes
that the MGSSELF_NAME proc file has been created. If it hasn't been
created, the proc code issues a WARN_ON.
The setup code clears the FSDB_MGS_SELF from &fsdb->fsdb_flags when it
creates the proc file, so we can key off of that to decide whether to
remove it.
Signed-off-by: Jeff Mahoney <jeffm@suse.com>
Change-Id: Idf58d1fa572eeced5dbaa72f03e38ee46a708166
Reviewed-on: http://review.whamcloud.com/5122
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Niu Yawei <yawei.niu@intel.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
if (!mgs->mgs_proc_live)
return 0;
- lprocfs_remove_proc_entry(fsdb->fsdb_name, mgs->mgs_proc_live);
+ /* didn't create the proc file for MGSSELF_NAME */
+ if (!test_bit(FSDB_MGS_SELF, &fsdb->fsdb_flags))
+ lprocfs_remove_proc_entry(fsdb->fsdb_name, mgs->mgs_proc_live);
return 0;
}