All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] setcifsacl.c: fix a bug of goto setcifsacl_facenum_ret
@ 2013-04-12  8:58 Peng Haitao
       [not found] ` <1365757129-25076-1-git-send-email-penght-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org>
  0 siblings, 1 reply; 3+ messages in thread
From: Peng Haitao @ 2013-04-12  8:58 UTC (permalink / raw)
  To: linux-cifs-u79uwXL29TY76Z2rM5mHXA

setcifsacl_facenum_ret: is called only if attrlen is equal to -1.

Signed-off-by: Peng Haitao <penght-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org>
---
 setcifsacl.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/setcifsacl.c b/setcifsacl.c
index 67dd29c..4b38459 100644
--- a/setcifsacl.c
+++ b/setcifsacl.c
@@ -822,9 +822,10 @@ cifsacl:
 		goto setcifsacl_action_ret;
 
 	attrlen = setxattr(filename, ATTRNAME, ntsdptr, bufsize, 0);
-	if (attrlen == -1)
+	if (attrlen == -1) {
 		printf("%s: setxattr error: %s\n", __func__, strerror(errno));
-	goto setcifsacl_facenum_ret;
+		goto setcifsacl_facenum_ret;
+	}
 
 	exit_plugin(plugin_handle);
 	return 0;
-- 
1.8.1.4

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

* Re: [PATCH] setcifsacl.c: fix a bug of goto setcifsacl_facenum_ret
       [not found] ` <1365757129-25076-1-git-send-email-penght-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org>
@ 2013-04-12 10:21   ` Jeff Layton
  2013-04-14 12:05   ` Jeff Layton
  1 sibling, 0 replies; 3+ messages in thread
From: Jeff Layton @ 2013-04-12 10:21 UTC (permalink / raw)
  To: Peng Haitao; +Cc: linux-cifs-u79uwXL29TY76Z2rM5mHXA

On Fri, 12 Apr 2013 16:58:49 +0800
Peng Haitao <penght-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org> wrote:

> setcifsacl_facenum_ret: is called only if attrlen is equal to -1.
> 
> Signed-off-by: Peng Haitao <penght-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org>
> ---
>  setcifsacl.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/setcifsacl.c b/setcifsacl.c
> index 67dd29c..4b38459 100644
> --- a/setcifsacl.c
> +++ b/setcifsacl.c
> @@ -822,9 +822,10 @@ cifsacl:
>  		goto setcifsacl_action_ret;
>  
>  	attrlen = setxattr(filename, ATTRNAME, ntsdptr, bufsize, 0);
> -	if (attrlen == -1)
> +	if (attrlen == -1) {
>  		printf("%s: setxattr error: %s\n", __func__, strerror(errno));
> -	goto setcifsacl_facenum_ret;
> +		goto setcifsacl_facenum_ret;
> +	}
>  
>  	exit_plugin(plugin_handle);
>  	return 0;

Well spotted -- will merge in a day or so if no one objects.

Thanks,
-- 
Jeff Layton <jlayton-eUNUBHrolfbYtjvyW6yDsg@public.gmane.org>

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

* Re: [PATCH] setcifsacl.c: fix a bug of goto setcifsacl_facenum_ret
       [not found] ` <1365757129-25076-1-git-send-email-penght-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org>
  2013-04-12 10:21   ` Jeff Layton
@ 2013-04-14 12:05   ` Jeff Layton
  1 sibling, 0 replies; 3+ messages in thread
From: Jeff Layton @ 2013-04-14 12:05 UTC (permalink / raw)
  To: Peng Haitao; +Cc: linux-cifs-u79uwXL29TY76Z2rM5mHXA

On Fri, 12 Apr 2013 16:58:49 +0800
Peng Haitao <penght-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org> wrote:

> setcifsacl_facenum_ret: is called only if attrlen is equal to -1.
> 
> Signed-off-by: Peng Haitao <penght-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org>
> ---
>  setcifsacl.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/setcifsacl.c b/setcifsacl.c
> index 67dd29c..4b38459 100644
> --- a/setcifsacl.c
> +++ b/setcifsacl.c
> @@ -822,9 +822,10 @@ cifsacl:
>  		goto setcifsacl_action_ret;
>  
>  	attrlen = setxattr(filename, ATTRNAME, ntsdptr, bufsize, 0);
> -	if (attrlen == -1)
> +	if (attrlen == -1) {
>  		printf("%s: setxattr error: %s\n", __func__, strerror(errno));
> -	goto setcifsacl_facenum_ret;
> +		goto setcifsacl_facenum_ret;
> +	}
>  
>  	exit_plugin(plugin_handle);
>  	return 0;

Merged...

Thanks for the fix!
-- 
Jeff Layton <jlayton-eUNUBHrolfbYtjvyW6yDsg@public.gmane.org>

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

end of thread, other threads:[~2013-04-14 12:05 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-04-12  8:58 [PATCH] setcifsacl.c: fix a bug of goto setcifsacl_facenum_ret Peng Haitao
     [not found] ` <1365757129-25076-1-git-send-email-penght-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org>
2013-04-12 10:21   ` Jeff Layton
2013-04-14 12:05   ` Jeff Layton

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.