From patchwork Fri Apr 18 18:44:23 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Trond Myklebust X-Patchwork-Id: 4017831 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 9AE5F9F2BA for ; Fri, 18 Apr 2014 18:46:30 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id DF651203AF for ; Fri, 18 Apr 2014 18:46:29 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 11B41203AC for ; Fri, 18 Apr 2014 18:46:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754508AbaDRSq0 (ORCPT ); Fri, 18 Apr 2014 14:46:26 -0400 Received: from mail-ig0-f178.google.com ([209.85.213.178]:63956 "EHLO mail-ig0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754220AbaDRSpu (ORCPT ); Fri, 18 Apr 2014 14:45:50 -0400 Received: by mail-ig0-f178.google.com with SMTP id hn18so943946igb.5 for ; Fri, 18 Apr 2014 11:45:50 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=2aVKPxJ5aRM1vSEuOec2tJxf2fjta4OK4SB+67oscBQ=; b=F7BkXapaDqOmO4invtVDJvVaTV0g2nHcK3MV//NQ+kBjpANqq6/nACrrvsyA3Elp3G ttre0Ub3kx2PABT7HwUZ9/YoJeBMBoQ8jh2486Gh4vFSk+B7p2zZSOUzPYMLgykspdgG IQaYaqgQUamBnI1f0SQEppc6raqbpn46T2n7M4kAKXXZRy5Ks6t/a8A4ItjQT/d4QS1x TkHyar3hIOfIm3laFtjbFHlLKq6GkYuIKBmCn77kGp64TkT5jqnVnxxy66yV5RbKhi0N MjhfHjH2dPBwlL+ZFcMX+vi2lRDph//gK4DywTNeJQL2+lpwxdxXM0Zp1HTM5HMmZ2ln z15w== X-Gm-Message-State: ALoCoQkIvTCe7zVkKWfmJwGW2taHDXfy2KhR6UWhNIoBuuW55N2Ld7vsLD3eKYJA6px0q2zyM97J X-Received: by 10.50.102.103 with SMTP id fn7mr5972880igb.22.1397846750000; Fri, 18 Apr 2014 11:45:50 -0700 (PDT) Received: from leira.trondhjem.org.localdomain (50-124-5-70.drr02.mskg.mi.frontiernet.net. [50.124.5.70]) by mx.google.com with ESMTPSA id j9sm6018922igu.10.2014.04.18.11.45.48 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 18 Apr 2014 11:45:49 -0700 (PDT) From: Trond Myklebust To: Bruce Fields Cc: linux-nfs@vger.kernel.org Subject: [PATCH 29/70] NFSd: Add a struct nfs4_file field to struct nfs4_stid Date: Fri, 18 Apr 2014 14:44:23 -0400 Message-Id: <1397846704-14567-30-git-send-email-trond.myklebust@primarydata.com> X-Mailer: git-send-email 1.9.0 In-Reply-To: <1397846704-14567-29-git-send-email-trond.myklebust@primarydata.com> References: <1397846704-14567-1-git-send-email-trond.myklebust@primarydata.com> <1397846704-14567-2-git-send-email-trond.myklebust@primarydata.com> <1397846704-14567-3-git-send-email-trond.myklebust@primarydata.com> <1397846704-14567-4-git-send-email-trond.myklebust@primarydata.com> <1397846704-14567-5-git-send-email-trond.myklebust@primarydata.com> <1397846704-14567-6-git-send-email-trond.myklebust@primarydata.com> <1397846704-14567-7-git-send-email-trond.myklebust@primarydata.com> <1397846704-14567-8-git-send-email-trond.myklebust@primarydata.com> <1397846704-14567-9-git-send-email-trond.myklebust@primarydata.com> <1397846704-14567-10-git-send-email-trond.myklebust@primarydata.com> <1397846704-14567-11-git-send-email-trond.myklebust@primarydata.com> <1397846704-14567-12-git-send-email-trond.myklebust@primarydata.com> <1397846704-14567-13-git-send-email-trond.myklebust@primarydata.com> <1397846704-14567-14-git-send-email-trond.myklebust@primarydata.com> <1397846704-14567-15-git-send-email-trond.myklebust@primarydata.com> <1397846704-14567-16-git-send-email-trond.myklebust@primarydata.com> <1397846704-14567-17-git-send-email-trond.myklebust@primarydata.com> <1397846704-14567-18-git-send-email-trond.myklebust@primarydata.com> <1397846704-14567-19-git-send-email-trond.myklebust@primarydata.com> <1397846704-14567-20-git-send-email-trond.myklebust@primarydata.com> <1397846704-14567-21-git-send-email-trond.myklebust@primarydata.com> <1397846704-14567-22-git-send-email-trond.myklebust@primarydata.com> <1397846704-14567-23-git-send-email-trond.myklebust@primarydata.com> <1397846704-14567-24-git-send-email-trond.myklebust@primarydata.com> <1397846704-14567-25-git-send-email-trond.myklebust@primarydata.com> <1397846704-14567-26-git-send-email-trond.myklebust@primarydata.com> <1397846704-14567-27-git-send-email-trond.myklebust@primarydata.com> <1397846704-14567-28-git-send-email-trond.myklebust@primarydata.com> <1397846704-14567-29-git-send-email-trond.myklebust@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=-7.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, 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 All stateids are associated with a nfs4_file. Let's consolidate... Signed-off-by: Trond Myklebust --- fs/nfsd/nfs4state.c | 2 ++ fs/nfsd/state.h | 1 + 2 files changed, 3 insertions(+) diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c index 32ab3f1c83f8..5bbef4720e7c 100644 --- a/fs/nfsd/nfs4state.c +++ b/fs/nfsd/nfs4state.c @@ -474,6 +474,8 @@ static void remove_stid(struct nfs4_stid *s) static void nfs4_free_stid(struct kmem_cache *slab, struct nfs4_stid *s) { + if (s->sc_file) + put_nfs4_file(s->sc_file); kmem_cache_free(slab, s); } diff --git a/fs/nfsd/state.h b/fs/nfsd/state.h index 9d0088c244a8..c6deef936693 100644 --- a/fs/nfsd/state.h +++ b/fs/nfsd/state.h @@ -85,6 +85,7 @@ struct nfs4_stid { unsigned char sc_type; stateid_t sc_stateid; struct nfs4_client *sc_client; + struct nfs4_file *sc_file; }; struct nfs4_delegation {