From patchwork Wed Sep 22 15:36:09 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Dickson X-Patchwork-Id: 12510867 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-17.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DB6BEC433EF for ; Wed, 22 Sep 2021 15:36:15 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C2440611CA for ; Wed, 22 Sep 2021 15:36:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231712AbhIVPho (ORCPT ); Wed, 22 Sep 2021 11:37:44 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:36632 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236455AbhIVPhn (ORCPT ); Wed, 22 Sep 2021 11:37:43 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1632324973; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=gHK8LswhxzhbPNVk9wxln1eGPiyRdTryFnDj15tEJMg=; b=doxwzzTTJilfip/LgOVEHb5i3E/aYAB+DNpS6lf7qQiMRvUcBM/hQVqqzfBDVCEFPvwKLP AjoQrvW7x/LQO8xkAGoOvHGvnhwJ4QCW0XTwE7A0P0LiaeBGUznCEhmQIcTZNEqJgdfvev Zq3Xchp9tqR739RvU07AhIqHlJNrpxM= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-12-d0uUGJf6MF-REpPWl0aNdQ-1; Wed, 22 Sep 2021 11:36:11 -0400 X-MC-Unique: d0uUGJf6MF-REpPWl0aNdQ-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 12547801E72 for ; Wed, 22 Sep 2021 15:36:11 +0000 (UTC) Received: from dobby.home.dicksonnet.net (ovpn-114-242.phx2.redhat.com [10.3.114.242]) by smtp.corp.redhat.com (Postfix) with ESMTP id C085D1000358 for ; Wed, 22 Sep 2021 15:36:10 +0000 (UTC) From: Steve Dickson To: Linux NFS Mailing list Subject: [PATCH 1/2] Move version.h into a common include directory Date: Wed, 22 Sep 2021 11:36:09 -0400 Message-Id: <20210922153610.60548-1-steved@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org Signed-off-by: Steve Dickson --- support/include/version.h | 1 + utils/gssd/svcgssd_krb5.c | 2 +- utils/nfsd/nfssvc.c | 2 +- utils/nfsdcld/nfsdcld.c | 2 +- 4 files changed, 4 insertions(+), 3 deletions(-) create mode 120000 support/include/version.h diff --git a/support/include/version.h b/support/include/version.h new file mode 120000 index 00000000..b7db0bbb --- /dev/null +++ b/support/include/version.h @@ -0,0 +1 @@ +../../utils/mount/version.h \ No newline at end of file diff --git a/utils/gssd/svcgssd_krb5.c b/utils/gssd/svcgssd_krb5.c index 305d4751..2503c384 100644 --- a/utils/gssd/svcgssd_krb5.c +++ b/utils/gssd/svcgssd_krb5.c @@ -46,7 +46,7 @@ #include "gss_oids.h" #include "err_util.h" #include "svcgssd_krb5.h" -#include "../mount/version.h" +#include "version.h" #define MYBUFLEN 1024 diff --git a/utils/nfsd/nfssvc.c b/utils/nfsd/nfssvc.c index 720bdd97..46452d97 100644 --- a/utils/nfsd/nfssvc.c +++ b/utils/nfsd/nfssvc.c @@ -25,7 +25,7 @@ #include "nfslib.h" #include "xlog.h" #include "nfssvc.h" -#include "../mount/version.h" +#include "version.h" #ifndef NFSD_FS_DIR #define NFSD_FS_DIR "/proc/fs/nfsd" diff --git a/utils/nfsdcld/nfsdcld.c b/utils/nfsdcld/nfsdcld.c index 636c3983..dbc7a57f 100644 --- a/utils/nfsdcld/nfsdcld.c +++ b/utils/nfsdcld/nfsdcld.c @@ -45,7 +45,7 @@ #include "cld.h" #include "cld-internal.h" #include "sqlite.h" -#include "../mount/version.h" +#include "version.h" #include "conffile.h" #include "legacy.h" From patchwork Wed Sep 22 15:36:10 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Dickson X-Patchwork-Id: 12510869 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-17.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 165BBC433F5 for ; Wed, 22 Sep 2021 15:36:16 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id EA51560F4C for ; Wed, 22 Sep 2021 15:36:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236434AbhIVPhp (ORCPT ); Wed, 22 Sep 2021 11:37:45 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:32683 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236400AbhIVPho (ORCPT ); Wed, 22 Sep 2021 11:37:44 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1632324973; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Xm50amDwEdJyT+MqX3sDHBl8pNMiVQt1LghCgwuKR2A=; b=OVMBVbaf0c4sgOb52x7QMUb5w0vEYHcpB4qHMWkqUT2N0+ozQyXM9gXmlCQL6Gu9Vy2x9e nKmmYCB3d2LUYipcB8+eJzwVo2fCox6F14X3GEoTxQzmf7jblmyqvvoLv4g6W5z8eQXp3X szxofDQWLShNXX3qunWwQIRhobDPVao= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-56-npSN3F-2OE6RkDl6JKiywg-1; Wed, 22 Sep 2021 11:36:12 -0400 X-MC-Unique: npSN3F-2OE6RkDl6JKiywg-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 817A39126B for ; Wed, 22 Sep 2021 15:36:11 +0000 (UTC) Received: from dobby.home.dicksonnet.net (ovpn-114-242.phx2.redhat.com [10.3.114.242]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3B56610013C1 for ; Wed, 22 Sep 2021 15:36:11 +0000 (UTC) From: Steve Dickson To: Linux NFS Mailing list Subject: [PATCH 2/2] mountd: only do NFSv4 logging on supported kernels. Date: Wed, 22 Sep 2021 11:36:10 -0400 Message-Id: <20210922153610.60548-2-steved@redhat.com> In-Reply-To: <20210922153610.60548-1-steved@redhat.com> References: <20210922153610.60548-1-steved@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1979816 Signed-off-by: Steve Dickson --- support/export/v4clients.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/support/export/v4clients.c b/support/export/v4clients.c index dd985463..5e4f1058 100644 --- a/support/export/v4clients.c +++ b/support/export/v4clients.c @@ -10,6 +10,7 @@ #include #include #include "export.h" +#include "version.h" /* search.h declares 'struct entry' and nfs_prot.h * does too. Easiest fix is to trick search.h into @@ -23,6 +24,8 @@ static int clients_fd = -1; void v4clients_init(void) { + if (linux_version_code() < MAKE_VERSION(5, 3, 0)) + return; if (clients_fd >= 0) return; clients_fd = inotify_init1(IN_NONBLOCK);