linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] gssd: ignore pipe files that do not exist
@ 2020-03-08 19:22 Steve Dickson
  2020-03-27 19:15 ` Steve Dickson
  0 siblings, 1 reply; 2+ messages in thread
From: Steve Dickson @ 2020-03-08 19:22 UTC (permalink / raw)
  To: Linux NFS Mailing list

As part commit e0eb6ebb which cleaned up the
dnotify to inotify conversion (commit 55197c98)
ignore pipe files that don't exist

Signed-off-by: Steve Dickson <steved@redhat.com>
---
 utils/gssd/gssd.c | 18 ++++++++++--------
 1 file changed, 10 insertions(+), 8 deletions(-)

diff --git a/utils/gssd/gssd.c b/utils/gssd/gssd.c
index c38dedb..588da0f 100644
--- a/utils/gssd/gssd.c
+++ b/utils/gssd/gssd.c
@@ -493,8 +493,8 @@ gssd_get_clnt(struct topdir *tdi, const char *name)
 	clp->wd = inotify_add_watch(inotify_fd, clp->relpath, IN_CREATE | IN_DELETE);
 	if (clp->wd < 0) {
 		if (errno != ENOENT)
-			printerr(0, "ERROR: inotify_add_watch failed for %s: %s\n",
-			 	clp->relpath, strerror(errno));
+			printerr(0, "ERROR: %s: inotify_add_watch failed for %s: %s\n",
+			 	__FUNCTION__, clp->relpath, strerror(errno));
 		goto out;
 	}
 
@@ -523,8 +523,9 @@ gssd_scan_clnt(struct clnt_info *clp)
 
 	clntfd = openat(pipefs_fd, clp->relpath, O_RDONLY);
 	if (clntfd < 0) {
-		printerr(0, "ERROR: can't openat %s: %s\n",
-			 clp->relpath, strerror(errno));
+		if (errno != ENOENT)
+			printerr(0, "ERROR: %s: can't openat %s: %s\n",
+			 	__FUNCTION__, clp->relpath, strerror(errno));
 		return -1;
 	}
 
@@ -588,8 +589,8 @@ gssd_get_topdir(const char *name)
 
 	tdi->wd = inotify_add_watch(inotify_fd, name, IN_CREATE);
 	if (tdi->wd < 0) {
-		printerr(0, "ERROR: inotify_add_watch failed for top dir %s: %s\n",
-			 tdi->name, strerror(errno));
+		printerr(0, "ERROR: %s: inotify_add_watch failed for top dir %s: %s\n",
+			 __FUNCTION__, tdi->name, strerror(errno));
 		free(tdi);
 		return NULL;
 	}
@@ -616,8 +617,9 @@ gssd_scan_topdir(const char *name)
 
 	dfd = openat(pipefs_fd, tdi->name, O_RDONLY);
 	if (dfd < 0) {
-		printerr(0, "ERROR: can't openat %s: %s\n",
-			 tdi->name, strerror(errno));
+		if (errno != ENOENT)
+			printerr(0, "ERROR: %s: can't openat %s: %s\n",
+			 	__FUNCTION__, tdi->name, strerror(errno));
 		return;
 	}
 
-- 
2.24.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] gssd: ignore pipe files that do not exist
  2020-03-08 19:22 [PATCH] gssd: ignore pipe files that do not exist Steve Dickson
@ 2020-03-27 19:15 ` Steve Dickson
  0 siblings, 0 replies; 2+ messages in thread
From: Steve Dickson @ 2020-03-27 19:15 UTC (permalink / raw)
  To: Linux NFS Mailing list



On 3/8/20 3:22 PM, Steve Dickson wrote:
> As part commit e0eb6ebb which cleaned up the
> dnotify to inotify conversion (commit 55197c98)
> ignore pipe files that don't exist
> 
> Signed-off-by: Steve Dickson <steved@redhat.com>
Committed... (tag: nfs-utils-2-4-4-rc2)

steved.
> ---
>  utils/gssd/gssd.c | 18 ++++++++++--------
>  1 file changed, 10 insertions(+), 8 deletions(-)
> 
> diff --git a/utils/gssd/gssd.c b/utils/gssd/gssd.c
> index c38dedb..588da0f 100644
> --- a/utils/gssd/gssd.c
> +++ b/utils/gssd/gssd.c
> @@ -493,8 +493,8 @@ gssd_get_clnt(struct topdir *tdi, const char *name)
>  	clp->wd = inotify_add_watch(inotify_fd, clp->relpath, IN_CREATE | IN_DELETE);
>  	if (clp->wd < 0) {
>  		if (errno != ENOENT)
> -			printerr(0, "ERROR: inotify_add_watch failed for %s: %s\n",
> -			 	clp->relpath, strerror(errno));
> +			printerr(0, "ERROR: %s: inotify_add_watch failed for %s: %s\n",
> +			 	__FUNCTION__, clp->relpath, strerror(errno));
>  		goto out;
>  	}
>  
> @@ -523,8 +523,9 @@ gssd_scan_clnt(struct clnt_info *clp)
>  
>  	clntfd = openat(pipefs_fd, clp->relpath, O_RDONLY);
>  	if (clntfd < 0) {
> -		printerr(0, "ERROR: can't openat %s: %s\n",
> -			 clp->relpath, strerror(errno));
> +		if (errno != ENOENT)
> +			printerr(0, "ERROR: %s: can't openat %s: %s\n",
> +			 	__FUNCTION__, clp->relpath, strerror(errno));
>  		return -1;
>  	}
>  
> @@ -588,8 +589,8 @@ gssd_get_topdir(const char *name)
>  
>  	tdi->wd = inotify_add_watch(inotify_fd, name, IN_CREATE);
>  	if (tdi->wd < 0) {
> -		printerr(0, "ERROR: inotify_add_watch failed for top dir %s: %s\n",
> -			 tdi->name, strerror(errno));
> +		printerr(0, "ERROR: %s: inotify_add_watch failed for top dir %s: %s\n",
> +			 __FUNCTION__, tdi->name, strerror(errno));
>  		free(tdi);
>  		return NULL;
>  	}
> @@ -616,8 +617,9 @@ gssd_scan_topdir(const char *name)
>  
>  	dfd = openat(pipefs_fd, tdi->name, O_RDONLY);
>  	if (dfd < 0) {
> -		printerr(0, "ERROR: can't openat %s: %s\n",
> -			 tdi->name, strerror(errno));
> +		if (errno != ENOENT)
> +			printerr(0, "ERROR: %s: can't openat %s: %s\n",
> +			 	__FUNCTION__, tdi->name, strerror(errno));
>  		return;
>  	}
>  
> 


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-03-27 19:15 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-08 19:22 [PATCH] gssd: ignore pipe files that do not exist Steve Dickson
2020-03-27 19:15 ` Steve Dickson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).