Whamcloud - gitweb
LU-2729 mgs: fix cleanup of nonexistant MGSSELF_NAME proc file
[fs/lustre-release.git] / lustre / mgs / lproc_mgs.c
index 54f299b..65513fd 100644 (file)
@@ -292,7 +292,9 @@ int lproc_mgs_del_live(struct mgs_device *mgs, struct fs_db *fsdb)
         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;
 }