Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1371097

[PATCH 11/18] staging: lustre: llite: Delaying creation of client side proc entries.

From James Simmons <jsimmons@infradead.org>
Newsgroups linux.kernel
Subject [PATCH 11/18] staging: lustre: llite: Delaying creation of client side proc entries.
Date 2016-04-05 03:50 +0200
Message-ID <rkohZ-3Gi-39@gated-at.bofh.it> (permalink)
References <rkohY-3Gi-11@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


From: Gaurav Mahajan <gmahajan@ddn.com>

In client_common_fill_super() proc entries are created before
before cl_sb_init() and therefore lu_site is not allocated resulting
in client crash when tried reading lu_site stats.
Delaying creation of proc entries after creation of all required data
structures fixed the problem.

Signed-off-by: Gaurav Mahajan <gmahajan@ddn.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-2941
Reviewed-on: http://review.whamcloud.com/6852
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Emoly Liu <emoly.liu@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
---
 drivers/staging/lustre/lustre/llite/llite_lib.c |   16 +++++++++-------
 1 files changed, 9 insertions(+), 7 deletions(-)

diff --git a/drivers/staging/lustre/lustre/llite/llite_lib.c b/drivers/staging/lustre/lustre/llite/llite_lib.c
index 95c55c3..9571742 100644
--- a/drivers/staging/lustre/lustre/llite/llite_lib.c
+++ b/drivers/staging/lustre/lustre/llite/llite_lib.c
@@ -166,12 +166,6 @@ static int client_common_fill_super(struct super_block *sb, char *md, char *dt,
 		return -ENOMEM;
 	}
 
-	if (llite_root) {
-		err = ldebugfs_register_mountpoint(llite_root, sb, dt, md);
-		if (err < 0)
-			CERROR("could not register mount in <debugfs>/lustre/llite\n");
-	}
-
 	/* indicate the features supported by this client */
 	data->ocd_connect_flags = OBD_CONNECT_IBITS    | OBD_CONNECT_NODEVOH  |
 				  OBD_CONNECT_ATTRFID  |
@@ -552,6 +546,15 @@ static int client_common_fill_super(struct super_block *sb, char *md, char *dt,
 	kfree(data);
 	kfree(osfs);
 
+	if (llite_root) {
+		err = ldebugfs_register_mountpoint(llite_root, sb, dt, md);
+		if (err < 0) {
+			CERROR("%s: could not register mount in debugfs: "
+			       "rc = %d\n", ll_get_fsname(sb, NULL, 0), err);
+			err = 0;
+		}
+	}
+
 	return err;
 out_root:
 	iput(root);
@@ -570,7 +573,6 @@ out_md:
 out:
 	kfree(data);
 	kfree(osfs);
-	ldebugfs_unregister_mountpoint(sbi);
 	return err;
 }
 
-- 
1.7.1

Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 00/18] fill in missing patches present in 2.4.92 version James Simmons <jsimmons@infradead.org> - 2016-04-05 03:50 +0200
  [PATCH 05/18] staging: lustre: libcfs: make D_HSM a unique value James Simmons <jsimmons@infradead.org> - 2016-04-05 03:50 +0200
  [PATCH 13/18] staging: lustre: hsm: Add CLF_RENAME_LAST flag James Simmons <jsimmons@infradead.org> - 2016-04-05 03:50 +0200
  [PATCH 16/18] staging: lustre: hsm: Add support to drop all pages for ll_data_version James Simmons <jsimmons@infradead.org> - 2016-04-05 03:50 +0200
  [PATCH 04/18] staging: lustre: libcfs: create array of debug names James Simmons <jsimmons@infradead.org> - 2016-04-05 03:50 +0200
  [PATCH 15/18] staging: lustre: llite: cancel open lock before closing file James Simmons <jsimmons@infradead.org> - 2016-04-05 03:50 +0200
  [PATCH 03/18] staging: lustre: libcfs: remove userland comments in libcfs_debug.h James Simmons <jsimmons@infradead.org> - 2016-04-05 03:50 +0200
  [PATCH 12/18] staging: lustre: mdc: document mdc_rpc_lock James Simmons <jsimmons@infradead.org> - 2016-04-05 03:50 +0200
  [PATCH 02/18] staging: lustre: llite: use 64bits flags in ll_lov_setea() James Simmons <jsimmons@infradead.org> - 2016-04-05 03:50 +0200
  [PATCH 08/18] staging: lustre: hsm: copy start error should set HP_FLAG_COMPLETED James Simmons <jsimmons@infradead.org> - 2016-04-05 03:50 +0200
  [PATCH 11/18] staging: lustre: llite: Delaying creation of client side proc entries. James Simmons <jsimmons@infradead.org> - 2016-04-05 03:50 +0200
  [PATCH 01/18] staging: lustre: ldlm: fix 'deadcode' errors James Simmons <jsimmons@infradead.org> - 2016-04-05 03:50 +0200
  [PATCH 17/18] staging: lustre: fix 'no effect' errors James Simmons <jsimmons@infradead.org> - 2016-04-05 03:50 +0200
  [PATCH 07/18] staging: lustre: hsm: rename hai_zero() HSM function James Simmons <jsimmons@infradead.org> - 2016-04-05 03:50 +0200
  [PATCH 10/18] staging: lustre: llite: reset writeback index in ll_writepages James Simmons <jsimmons@infradead.org> - 2016-04-05 03:50 +0200
  [PATCH 06/18] staging: lustre: hsm: Fix lu_ref for lease handle James Simmons <jsimmons@infradead.org> - 2016-04-05 03:50 +0200
  [PATCH 14/18] staging: lustre: fix 'NULL pointer dereference' errors James Simmons <jsimmons@infradead.org> - 2016-04-05 03:50 +0200
  [PATCH 09/18] staging: lustre: lov: Get the correct address of lmm_objects James Simmons <jsimmons@infradead.org> - 2016-04-05 04:00 +0200

csiph-web