From c0a1a6d769aedd23c80fc12721cc98b126bec91f Mon Sep 17 00:00:00 2001 From: piaojun Date: Wed, 31 Jan 2018 16:14:51 -0800 Subject: [PATCH] ocfs2/xattr: assign errno to 'ret' in ocfs2_calc_xattr_init() We need catch the errno returned by ocfs2_xattr_get_nolock() and assign it to 'ret' for printing and noticing upper callers. Link: http://lkml.kernel.org/r/5A571CAF.8050709@huawei.com Signed-off-by: Jun Piao Reviewed-by: Alex Chen Reviewed-by: Yiwen Jiang Acked-by: Gang He Acked-by: Changwei Ge Cc: Mark Fasheh Cc: Joel Becker Cc: Junxiao Bi Cc: Joseph Qi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- fs/ocfs2/xattr.c | 1 + 1 file changed, 1 insertion(+) diff --git a/fs/ocfs2/xattr.c b/fs/ocfs2/xattr.c index 2423e905ec1a..268619c96b4e 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; }