diff mbox series

[2/2] mountd: only do NFSv4 logging on supported kernels.

Message ID 20210922153610.60548-2-steved@redhat.com (mailing list archive)
State New, archived
Headers show
Series [1/2] Move version.h into a common include directory | expand

Commit Message

Steve Dickson Sept. 22, 2021, 3:36 p.m. UTC
Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1979816
Signed-off-by: Steve Dickson <steved@redhat.com>
---
 support/export/v4clients.c | 3 +++
 1 file changed, 3 insertions(+)

Comments

Steve Dickson Sept. 23, 2021, 4:37 p.m. UTC | #1
On 9/22/21 11:36 AM, Steve Dickson wrote:
> Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1979816
> Signed-off-by: Steve Dickson <steved@redhat.com>
Committed... (tag: nfs-utils-2-5-5-rc3)

steved.

> ---
>   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 <sys/inotify.h>
>   #include <errno.h>
>   #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);
>
diff mbox series

Patch

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 <sys/inotify.h>
 #include <errno.h>
 #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);