From patchwork Tue Oct 15 06:57:55 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benny Halevy X-Patchwork-Id: 3043631 Return-Path: X-Original-To: patchwork-linux-nfs@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id E1633BF924 for ; Tue, 15 Oct 2013 06:58:06 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id D984220265 for ; Tue, 15 Oct 2013 06:58:05 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id AA71D20263 for ; Tue, 15 Oct 2013 06:58:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753023Ab3JOG6D (ORCPT ); Tue, 15 Oct 2013 02:58:03 -0400 Received: from mail-we0-f173.google.com ([74.125.82.173]:58255 "EHLO mail-we0-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752206Ab3JOG6B (ORCPT ); Tue, 15 Oct 2013 02:58:01 -0400 Received: by mail-we0-f173.google.com with SMTP id u57so7943318wes.18 for ; Mon, 14 Oct 2013 23:57:59 -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=i6I4bxqYzmXHIZ/rJmV8jBEFwTID8K6czha//zZrAWg=; b=VIu9Q65amjjAhf+IuapUteFMqN/aZdH0vbO7vpUDHUjbr0xkv2/HPH4+/1OSahu2Vl s+evm37MvTC/Uxkduh4+DcUIKVLmMGscA6uMkgpJAQoHRGwx9mhsU2ZQdU37tJz08S7H gOL2WJHXUh21rEcwmy0LMmqmg5CfqZX9turG31LpAjO0nU7/hzxTtqK605XO7vocK2xW G9VPf62RRVdIko8Y6u3Sa55dYHk1+5wm+3oS1KWp+uMA9TBsWIjDEsom8zNmSM4w5Btg 07DqrAdbHWj1KfgbD3uUL9W+nk6Jp1vzv53fLOWy1r/XQVODFUjaO35oIUZUej+hB8gt 1t1w== X-Received: by 10.180.210.231 with SMTP id mx7mr18083120wic.5.1381820279064; Mon, 14 Oct 2013 23:57:59 -0700 (PDT) Received: from bhalevy-lt.il.tonian.com (bzq-80-49-130.static.bezeqint.net. [82.80.49.130]) by mx.google.com with ESMTPSA id i8sm3111730wiy.6.1969.12.31.16.00.00 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Mon, 14 Oct 2013 23:57:58 -0700 (PDT) From: Benny Halevy To: bfields@redhat.com Cc: linux-nfs@vger.kernel.org, Benny Halevy Subject: [PATCH 1/2] nfsd: nfs4_open_delegation needs to remove_stid rather than unhash_stid Date: Tue, 15 Oct 2013 09:57:55 +0300 Message-Id: <1381820275-14078-1-git-send-email-bhalevy@primarydata.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <525CE711.1040107@primarydata.com> References: <525CE711.1040107@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.3 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 In the out_free: path, the newly allocated stid must be removed rather than unhashed so it can never be found. Signed-off-by: Benny Halevy --- fs/nfsd/nfs4state.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c index 64c167f..b8f3c7e 100644 --- a/fs/nfsd/nfs4state.c +++ b/fs/nfsd/nfs4state.c @@ -3157,7 +3157,7 @@ static void nfsd4_open_deleg_none_ext(struct nfsd4_open *open, int status) open->op_delegate_type = NFS4_OPEN_DELEGATE_READ; return; out_free: - unhash_stid(&dp->dl_stid); + remove_stid(&dp->dl_stid); nfs4_put_delegation(dp); out_no_deleg: open->op_delegate_type = NFS4_OPEN_DELEGATE_NONE;