From patchwork Sun Dec 15 15:51:59 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benny Halevy X-Patchwork-Id: 3350451 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 64B04C0D4A for ; Sun, 15 Dec 2013 15:52:09 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 93A1D20121 for ; Sun, 15 Dec 2013 15:52:08 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B01832015B for ; Sun, 15 Dec 2013 15:52:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751474Ab3LOPwG (ORCPT ); Sun, 15 Dec 2013 10:52:06 -0500 Received: from mail-ee0-f44.google.com ([74.125.83.44]:57351 "EHLO mail-ee0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751388Ab3LOPwF (ORCPT ); Sun, 15 Dec 2013 10:52:05 -0500 Received: by mail-ee0-f44.google.com with SMTP id b57so1753808eek.3 for ; Sun, 15 Dec 2013 07:52:03 -0800 (PST) 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=/bX3EgOrJJIHrky3QyeM8814l+7T52EgUId0KBOMfgs=; b=dbx1nwOvVrzu08Vcn0tPQsTezpnYppaLsl/zC4ek4Qa3JnckAAUbX++iG1VYYrXWFN EiSJFIh4EIbGJVa2GgpnRNHeoHxm5I3/CO3c5LzYXfMY2aSOJza7Bp4uuxjnJ+f7SCTr LiXwOtErx/9weEsj8Gff7yHOjIkBnfQD3tjHzQgn7qpwrj4e1l+AAibj1z00n2yrF4kW xWKNZ6yBsUYadNpwFY00YJoB3IwYvEKuyT0ZeVr4G27YLiWO/pgBYAKHuDLZ3TGK81LR KNh+FMvEUnz/JcGLQox9fJ3WWfgM1FsP8d8NnrrSJQPpD8x82j8ME+Q0NsoHyQTy/SbJ wgpg== X-Received: by 10.14.177.6 with SMTP id c6mr1196816eem.113.1387122723582; Sun, 15 Dec 2013 07:52:03 -0800 (PST) Received: from localhost.il.tonian.com (bzq-80-49-130.static.bezeqint.net. [82.80.49.130]) by mx.google.com with ESMTPSA id a45sm31463271eem.6.2013.12.15.07.52.01 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 15 Dec 2013 07:52:02 -0800 (PST) From: Benny Halevy To: bfields@redhat.com Cc: linux-nfs@vger.kernel.org, Benny Halevy Subject: [PATCH v2 2/2] nfsd4: ignore nfsv4.1 lockowners in nfsd4_release_lockowner Date: Sun, 15 Dec 2013 17:51:59 +0200 Message-Id: <1387122719-23656-1-git-send-email-bhalevy@primarydata.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <52ADCFC2.7060504@gmail.com> References: <52ADCFC2.7060504@gmail.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 RELEASE_LOCKOWNER is a NFSv4.0 operation only so it can quickly skip lockowners created by nfsv4.1 clients. Signed-off-by: Benny Halevy --- fs/nfsd/nfs4state.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c index b04f765..7d79494 100644 --- a/fs/nfsd/nfs4state.c +++ b/fs/nfsd/nfs4state.c @@ -4652,6 +4652,9 @@ nfsd4_release_lockowner(struct svc_rqst *rqstp, list_for_each_entry(sop, &nn->ownerstr_hashtbl[hashval], so_strhash) { if (sop->so_is_open_owner) continue; + /* This is NFSv4.0 only operation, skip NFSv4.x lockowners */ + if (sop->so_client->cl_minorversion) + continue; if (!same_owner_str(sop, owner, clid)) continue; lo = lockowner(sop);