diff mbox

[RFC,v0,21/49] nfsd: no need to unhash_stid before free

Message ID 1380220876-13642-1-git-send-email-bhalevy@primarydata.com (mailing list archive)
State New, archived
Headers show

Commit Message

Benny Halevy Sept. 26, 2013, 6:41 p.m. UTC
idr_remove is about to be called before kmem_cache_free so unhashing it
is redundant

Signed-off-by: Benny Halevy <bhalevy@primarydata.com>
---
 fs/nfsd/nfs4state.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

Comments

Christoph Hellwig Oct. 11, 2013, 7:37 p.m. UTC | #1
On Thu, Sep 26, 2013 at 02:41:16PM -0400, Benny Halevy wrote:
> idr_remove is about to be called before kmem_cache_free so unhashing it
> is redundant
> 
> Signed-off-by: Benny Halevy <bhalevy@primarydata.com>

This is probably something thast should go straight to Bruce, same for
the next one in the series.

--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Benny Halevy Oct. 13, 2013, 6:23 a.m. UTC | #2
On 2013-10-11 22:37, Christoph Hellwig wrote:
> On Thu, Sep 26, 2013 at 02:41:16PM -0400, Benny Halevy wrote:
>> idr_remove is about to be called before kmem_cache_free so unhashing it
>> is redundant
>>
>> Signed-off-by: Benny Halevy <bhalevy@primarydata.com>
> 
> This is probably something thast should go straight to Bruce, same for
> the next one in the series.
> 

True.
Bruce, are you ok with merging these patches for 3.13?

Benny
--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Bruce Fields Oct. 13, 2013, 7:28 p.m. UTC | #3
On Sun, Oct 13, 2013 at 09:23:51AM +0300, Benny Halevy wrote:
> On 2013-10-11 22:37, Christoph Hellwig wrote:
> > On Thu, Sep 26, 2013 at 02:41:16PM -0400, Benny Halevy wrote:
> >> idr_remove is about to be called before kmem_cache_free so unhashing it
> >> is redundant
> >>
> >> Signed-off-by: Benny Halevy <bhalevy@primarydata.com>
> > 
> > This is probably something thast should go straight to Bruce, same for
> > the next one in the series.
> > 
> 
> True.
> Bruce, are you ok with merging these patches for 3.13?

Could you just resend separately anything that can be justified as a
bugfix or cleanup independent of the rest of the pnfs stuff?

--b.
--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c
index a8a18d4..214e42d 100644
--- a/fs/nfsd/nfs4state.c
+++ b/fs/nfsd/nfs4state.c
@@ -677,7 +677,6 @@  static void unhash_open_stateid(struct nfs4_ol_stateid *stp)
 static void release_open_stateid(struct nfs4_ol_stateid *stp)
 {
 	unhash_open_stateid(stp);
-	unhash_stid(&stp->st_stid);
 	free_generic_stateid(stp);
 }
 
@@ -699,7 +698,6 @@  static void release_last_closed_stateid(struct nfs4_openowner *oo)
 	struct nfs4_ol_stateid *s = oo->oo_last_closed_stid;
 
 	if (s) {
-		unhash_stid(&s->st_stid);
 		free_generic_stateid(s);
 		oo->oo_last_closed_stid = NULL;
 	}
@@ -4043,10 +4041,9 @@  static void nfsd4_close_open_stateid(struct nfs4_ol_stateid *s)
 
 	nfsd4_close_open_stateid(stp);
 
-	if (cstate->minorversion) {
-		unhash_stid(&stp->st_stid);
+	if (cstate->minorversion)
 		free_generic_stateid(stp);
-	} else
+	else
 		oo->oo_last_closed_stid = stp;
 
 	if (list_empty(&oo->oo_owner.so_stateids)) {