From: Dan Carpenter <dan.carpenter@oracle.com> To: lustre-devel@lists.lustre.org Subject: [patch] staging: lustre: remove unused variable Date: Tue, 03 Nov 2015 22:16:16 +0000 [thread overview] Message-ID: <20151103221616.GD19280@mwanda> (raw) The "->lr_lvb_data" struct member is never used. Delete it. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> --- I have compile tested this. I looked through the history and it seems to never have been used. I wonder if we can remove the locking as well. diff --git a/drivers/staging/lustre/lustre/include/lustre_dlm.h b/drivers/staging/lustre/lustre/include/lustre_dlm.h index 0e75a15..138479a 100644 --- a/drivers/staging/lustre/lustre/include/lustre_dlm.h +++ b/drivers/staging/lustre/lustre/include/lustre_dlm.h @@ -872,8 +872,6 @@ struct ldlm_resource { */ struct mutex lr_lvb_mutex; int lr_lvb_len; - /** protected by lr_lock */ - void *lr_lvb_data; /** When the resource was considered as contended. */ unsigned long lr_contention_time; diff --git a/drivers/staging/lustre/lustre/ldlm/ldlm_resource.c b/drivers/staging/lustre/lustre/ldlm/ldlm_resource.c index c0a54bf..b55a4f0 100644 --- a/drivers/staging/lustre/lustre/ldlm/ldlm_resource.c +++ b/drivers/staging/lustre/lustre/ldlm/ldlm_resource.c @@ -1154,8 +1154,6 @@ ldlm_resource_get(struct ldlm_namespace *ns, struct ldlm_resource *parent, CERROR("%s: lvbo_init failed for resource %#llx:%#llx: rc = %d\n", ns->ns_obd->obd_name, name->name[0], name->name[1], rc); - kfree(res->lr_lvb_data); - res->lr_lvb_data = NULL; res->lr_lvb_len = rc; mutex_unlock(&res->lr_lvb_mutex); ldlm_resource_putref(res);
WARNING: multiple messages have this Message-ID (diff)
From: Dan Carpenter <dan.carpenter@oracle.com> To: lustre-devel@lists.lustre.org Subject: [lustre-devel] [patch] staging: lustre: remove unused variable Date: Wed, 4 Nov 2015 01:16:16 +0300 [thread overview] Message-ID: <20151103221616.GD19280@mwanda> (raw) The "->lr_lvb_data" struct member is never used. Delete it. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> --- I have compile tested this. I looked through the history and it seems to never have been used. I wonder if we can remove the locking as well. diff --git a/drivers/staging/lustre/lustre/include/lustre_dlm.h b/drivers/staging/lustre/lustre/include/lustre_dlm.h index 0e75a15..138479a 100644 --- a/drivers/staging/lustre/lustre/include/lustre_dlm.h +++ b/drivers/staging/lustre/lustre/include/lustre_dlm.h @@ -872,8 +872,6 @@ struct ldlm_resource { */ struct mutex lr_lvb_mutex; int lr_lvb_len; - /** protected by lr_lock */ - void *lr_lvb_data; /** When the resource was considered as contended. */ unsigned long lr_contention_time; diff --git a/drivers/staging/lustre/lustre/ldlm/ldlm_resource.c b/drivers/staging/lustre/lustre/ldlm/ldlm_resource.c index c0a54bf..b55a4f0 100644 --- a/drivers/staging/lustre/lustre/ldlm/ldlm_resource.c +++ b/drivers/staging/lustre/lustre/ldlm/ldlm_resource.c @@ -1154,8 +1154,6 @@ ldlm_resource_get(struct ldlm_namespace *ns, struct ldlm_resource *parent, CERROR("%s: lvbo_init failed for resource %#llx:%#llx: rc = %d\n", ns->ns_obd->obd_name, name->name[0], name->name[1], rc); - kfree(res->lr_lvb_data); - res->lr_lvb_data = NULL; res->lr_lvb_len = rc; mutex_unlock(&res->lr_lvb_mutex); ldlm_resource_putref(res);
next reply other threads:[~2015-11-03 22:16 UTC|newest] Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top 2015-11-03 22:16 Dan Carpenter [this message] 2015-11-03 22:16 ` [lustre-devel] [patch] staging: lustre: remove unused variable Dan Carpenter 2015-11-03 22:38 ` Simmons, James A. 2015-11-03 22:38 ` [lustre-devel] " Simmons, James A. 2015-11-04 1:23 ` Greg Kroah-Hartman 2015-11-04 1:23 ` [lustre-devel] " Greg Kroah-Hartman 2015-11-04 1:43 ` Dilger, Andreas 2015-11-04 1:43 ` Dilger, Andreas -- strict thread matches above, loose matches on Subject: below -- 2015-05-11 10:47 [PATCH] " Sudip Mukherjee 2015-05-11 11:31 ` Dan Carpenter 2015-05-11 11:43 ` Sudip Mukherjee 2015-05-11 11:53 ` Drokin, Oleg
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20151103221616.GD19280@mwanda \ --to=dan.carpenter@oracle.com \ --cc=lustre-devel@lists.lustre.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.