All of lore.kernel.org
 help / color / mirror / Atom feed
* [Ocfs2-devel] [PATCH] ocfs2/xattr: assign errno to 'ret' in ocfs2_calc_xattr_init()
@ 2018-01-11  8:13 piaojun
  2018-01-11  8:40 ` Gang He
  2018-01-11 10:10 ` Changwei Ge
  0 siblings, 2 replies; 3+ messages in thread
From: piaojun @ 2018-01-11  8:13 UTC (permalink / raw)
  To: ocfs2-devel

We need catch the errno returned by ocfs2_xattr_get_nolock() and assign
it to 'ret' for printing and noticing upper callers.

Signed-off-by: Jun Piao <piaojun@huawei.com>
Reviewed-by: Alex Chen <alex.chen@huawei.com>
Reviewed-by: Yiwen Jiang <jiangyiwen@huawei.com>
---
 fs/ocfs2/xattr.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/fs/ocfs2/xattr.c b/fs/ocfs2/xattr.c
index 5fdf269..439f567 100644
--- a/fs/ocfs2/xattr.c
+++ b/fs/ocfs2/xattr.c
@@ -646,6 +646,7 @@ int ocfs2_calc_xattr_init(struct inode *dir,
 			if (S_ISDIR(mode))
 				a_size <<= 1;
 		} else if (acl_len != 0 && acl_len != -ENODATA) {
+			ret = acl_len;
 			mlog_errno(ret);
 			return ret;
 		}
-- 

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

* [Ocfs2-devel] [PATCH] ocfs2/xattr: assign errno to 'ret' in ocfs2_calc_xattr_init()
  2018-01-11  8:13 [Ocfs2-devel] [PATCH] ocfs2/xattr: assign errno to 'ret' in ocfs2_calc_xattr_init() piaojun
@ 2018-01-11  8:40 ` Gang He
  2018-01-11 10:10 ` Changwei Ge
  1 sibling, 0 replies; 3+ messages in thread
From: Gang He @ 2018-01-11  8:40 UTC (permalink / raw)
  To: ocfs2-devel

Looks good.


>>> 
> We need catch the errno returned by ocfs2_xattr_get_nolock() and assign
> it to 'ret' for printing and noticing upper callers.
> 
> Signed-off-by: Jun Piao <piaojun@huawei.com>
> Reviewed-by: Alex Chen <alex.chen@huawei.com>
> Reviewed-by: Yiwen Jiang <jiangyiwen@huawei.com>
Reviewed-by: Gang He <ghe@suse.com>

> ---
>  fs/ocfs2/xattr.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/fs/ocfs2/xattr.c b/fs/ocfs2/xattr.c
> index 5fdf269..439f567 100644
> --- a/fs/ocfs2/xattr.c
> +++ b/fs/ocfs2/xattr.c
> @@ -646,6 +646,7 @@ int ocfs2_calc_xattr_init(struct inode *dir,
>  			if (S_ISDIR(mode))
>  				a_size <<= 1;
>  		} else if (acl_len != 0 && acl_len != -ENODATA) {
> +			ret = acl_len;
>  			mlog_errno(ret);
>  			return ret;
>  		}
> -- 
> 
> _______________________________________________
> Ocfs2-devel mailing list
> Ocfs2-devel at oss.oracle.com 
> https://oss.oracle.com/mailman/listinfo/ocfs2-devel

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

* [Ocfs2-devel] [PATCH] ocfs2/xattr: assign errno to 'ret' in ocfs2_calc_xattr_init()
  2018-01-11  8:13 [Ocfs2-devel] [PATCH] ocfs2/xattr: assign errno to 'ret' in ocfs2_calc_xattr_init() piaojun
  2018-01-11  8:40 ` Gang He
@ 2018-01-11 10:10 ` Changwei Ge
  1 sibling, 0 replies; 3+ messages in thread
From: Changwei Ge @ 2018-01-11 10:10 UTC (permalink / raw)
  To: ocfs2-devel

Acked-by: Changwei Ge <ge.changwei@h3c.com>

On 2018/1/11 16:14, piaojun wrote:
> We need catch the errno returned by ocfs2_xattr_get_nolock() and assign
> it to 'ret' for printing and noticing upper callers.
> 
> Signed-off-by: Jun Piao <piaojun@huawei.com>
> Reviewed-by: Alex Chen <alex.chen@huawei.com>
> Reviewed-by: Yiwen Jiang <jiangyiwen@huawei.com>
> ---
>   fs/ocfs2/xattr.c | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/fs/ocfs2/xattr.c b/fs/ocfs2/xattr.c
> index 5fdf269..439f567 100644
> --- a/fs/ocfs2/xattr.c
> +++ b/fs/ocfs2/xattr.c
> @@ -646,6 +646,7 @@ int ocfs2_calc_xattr_init(struct inode *dir,
>   			if (S_ISDIR(mode))
>   				a_size <<= 1;
>   		} else if (acl_len != 0 && acl_len != -ENODATA) {
> +			ret = acl_len;
>   			mlog_errno(ret);
>   			return ret;
>   		}
> 

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

end of thread, other threads:[~2018-01-11 10:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-01-11  8:13 [Ocfs2-devel] [PATCH] ocfs2/xattr: assign errno to 'ret' in ocfs2_calc_xattr_init() piaojun
2018-01-11  8:40 ` Gang He
2018-01-11 10:10 ` Changwei Ge

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.