From patchwork Thu Sep 26 18:41:16 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benny Halevy X-Patchwork-Id: 2950281 Return-Path: X-Original-To: patchwork-linux-nfs@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id CB4D99F288 for ; Thu, 26 Sep 2013 18:41:31 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id D55472017B for ; Thu, 26 Sep 2013 18:41:27 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B62A3202DD for ; Thu, 26 Sep 2013 18:41:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752836Ab3IZSlU (ORCPT ); Thu, 26 Sep 2013 14:41:20 -0400 Received: from mail-qc0-f179.google.com ([209.85.216.179]:50048 "EHLO mail-qc0-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752440Ab3IZSlU (ORCPT ); Thu, 26 Sep 2013 14:41:20 -0400 Received: by mail-qc0-f179.google.com with SMTP id l4so1034908qcv.38 for ; Thu, 26 Sep 2013 11:41:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=BHoX2oagwXmti7IGUDKVl5PSxjhYCwbaMmPBp7h8Tpw=; b=M3dIq9ooa9P3mmerhGMIGMgsYN/HxhA+T0WPz+gDyXgaVi4B18ByJFcI4R4lx8CZBg wzQBEeIGbff6AwUJpxGfN79Ueh7xfdvc348lC+3Inv5OLsV3ncnX4XUzVCevoFsOzvza git2pWDd3JQLCTKEZA9+19BzK/xy0pW1baMRa2r8jrGiUSUFtJjyZCmrOA89+JbROa+Y MBfld0Jq0bvsWXFVvTo6/psamYIHgUxNGU1cogGy+lDsmomIVs3usA3umyWfZ2UR3hha wKjYwariG7Xii17CsifOVIAp/x7OGrlxDktRhU0sodSJnkhUNoJaLhnZW8DgNCFPiD7U wceQ== X-Received: by 10.224.43.84 with SMTP id v20mr8569309qae.45.1380220879431; Thu, 26 Sep 2013 11:41:19 -0700 (PDT) Received: from bhalevy-lt.il.tonian.com.com (nat-pool-bos-u.redhat.com. [66.187.233.207]) by mx.google.com with ESMTPSA id 5sm10286193qao.3.1969.12.31.16.00.00 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 26 Sep 2013 11:41:18 -0700 (PDT) From: Benny Halevy To: " J. Bruce Fields" Cc: linux-nfs@vger.kernel.org Subject: [PATCH RFC v0 21/49] nfsd: no need to unhash_stid before free Date: Thu, 26 Sep 2013 14:41:16 -0400 Message-Id: <1380220876-13642-1-git-send-email-bhalevy@primarydata.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <52447EA0.7070004@primarydata.com> References: <52447EA0.7070004@primarydata.com> Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org X-Spam-Status: No, score=-9.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP idr_remove is about to be called before kmem_cache_free so unhashing it is redundant Signed-off-by: Benny Halevy --- fs/nfsd/nfs4state.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) 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)) {