kernel-janitors.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch] staging: lustre: remove unused variable
@ 2015-11-03 22:16 Dan Carpenter
  2015-11-03 22:38 ` Simmons, James A.
  2015-11-04  1:43 ` [lustre-devel] " Dilger, Andreas
  0 siblings, 2 replies; 4+ messages in thread
From: Dan Carpenter @ 2015-11-03 22:16 UTC (permalink / raw)
  To: lustre-devel

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);

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* RE: [patch] staging: lustre: remove unused variable
  2015-11-03 22:16 [patch] staging: lustre: remove unused variable Dan Carpenter
@ 2015-11-03 22:38 ` Simmons, James A.
  2015-11-04  1:23   ` Greg Kroah-Hartman
  2015-11-04  1:43 ` [lustre-devel] " Dilger, Andreas
  1 sibling, 1 reply; 4+ messages in thread
From: Simmons, James A. @ 2015-11-03 22:38 UTC (permalink / raw)
  To: lustre-devel


>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.

This is used by the quota and ofd layer which are both server side. 

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [patch] staging: lustre: remove unused variable
  2015-11-03 22:38 ` Simmons, James A.
@ 2015-11-04  1:23   ` Greg Kroah-Hartman
  0 siblings, 0 replies; 4+ messages in thread
From: Greg Kroah-Hartman @ 2015-11-04  1:23 UTC (permalink / raw)
  To: lustre-devel

On Tue, Nov 03, 2015 at 10:38:15PM +0000, Simmons, James A. wrote:
> 
> >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.
> 
> This is used by the quota and ofd layer which are both server side. 

What does that mean here?

confused,

greg k-h

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [lustre-devel] [patch] staging: lustre: remove unused variable
  2015-11-03 22:16 [patch] staging: lustre: remove unused variable Dan Carpenter
  2015-11-03 22:38 ` Simmons, James A.
@ 2015-11-04  1:43 ` Dilger, Andreas
  1 sibling, 0 replies; 4+ messages in thread
From: Dilger, Andreas @ 2015-11-04  1:43 UTC (permalink / raw)
  To: lustre-devel

On 2015/11/03, 15:38, "Simmons, James A." <simmonsja@ornl.gov> wrote:

>>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.
>
>This is used by the quota and ofd layer which are both server side.

When the server code is merged upstream this can be added to a union that
contains only server-side data that overlaps with a union containing only
client-side data.  For now it is fine to remove from the kernel.

Cheers, Andreas
-- 
Andreas Dilger

Lustre Software Architect
Intel High Performance Data Division



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-11-04  1:43 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-03 22:16 [patch] staging: lustre: remove unused variable Dan Carpenter
2015-11-03 22:38 ` Simmons, James A.
2015-11-04  1:23   ` Greg Kroah-Hartman
2015-11-04  1:43 ` [lustre-devel] " Dilger, Andreas

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).