Whamcloud - gitweb
LU-2941 llite: Delaying creation of client side proc entries.
[fs/lustre-release.git] / lustre / llite / llite_lib.c
index d65710d..43eb25a 100644 (file)
@@ -195,13 +195,6 @@ static int client_common_fill_super(struct super_block *sb, char *md, char *dt,
                 RETURN(-ENOMEM);
         }
 
-        if (proc_lustre_fs_root) {
-                err = lprocfs_register_mountpoint(proc_lustre_fs_root, sb,
-                                                  dt, md);
-                if (err < 0)
-                        CERROR("could not register mount in /proc/fs/lustre\n");
-        }
-
         /* indicate the features supported by this client */
         data->ocd_connect_flags = OBD_CONNECT_IBITS    | OBD_CONNECT_NODEVOH  |
                                   OBD_CONNECT_ATTRFID  |
@@ -606,6 +599,15 @@ static int client_common_fill_super(struct super_block *sb, char *md, char *dt,
                 OBD_FREE_PTR(data);
         if (osfs != NULL)
                 OBD_FREE_PTR(osfs);
+       if (proc_lustre_fs_root != NULL) {
+               err = lprocfs_register_mountpoint(proc_lustre_fs_root, sb,
+                                                 dt, md);
+               if (err < 0) {
+                       CERROR("%s: could not register mount in lprocfs: "
+                              "rc = %d\n", ll_get_fsname(sb, NULL, 0), err);
+                       err = 0;
+               }
+       }
 
         RETURN(err);
 out_root:
@@ -628,7 +630,6 @@ out:
                 OBD_FREE_PTR(data);
         if (osfs != NULL)
                 OBD_FREE_PTR(osfs);
-        lprocfs_unregister_mountpoint(sbi);
         return err;
 }