summaryrefslogtreecommitdiffstats
path: root/fs/ocfs2
diff options
context:
space:
mode:
authorpiaojun <piaojun@huawei.com>2018-01-31 19:14:51 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2018-01-31 20:18:35 -0500
commitc0a1a6d769aedd23c80fc12721cc98b126bec91f (patch)
tree01df73ac49cc941df59ad9469a9352bf5cad96dd /fs/ocfs2
parentff26cc10aec128c3f86b5611fd5f59c71d49c0e3 (diff)
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 <piaojun@huawei.com> Reviewed-by: Alex Chen <alex.chen@huawei.com> Reviewed-by: Yiwen Jiang <jiangyiwen@huawei.com> Acked-by: Gang He <ghe@suse.com> Acked-by: Changwei Ge <ge.changwei@h3c.com> Cc: Mark Fasheh <mfasheh@versity.com> Cc: Joel Becker <jlbec@evilplan.org> Cc: Junxiao Bi <junxiao.bi@oracle.com> Cc: Joseph Qi <jiangqi903@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/ocfs2')
-rw-r--r--fs/ocfs2/xattr.c1
1 files changed, 1 insertions, 0 deletions
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,
646 if (S_ISDIR(mode)) 646 if (S_ISDIR(mode))
647 a_size <<= 1; 647 a_size <<= 1;
648 } else if (acl_len != 0 && acl_len != -ENODATA) { 648 } else if (acl_len != 0 && acl_len != -ENODATA) {
649 ret = acl_len;
649 mlog_errno(ret); 650 mlog_errno(ret);
650 return ret; 651 return ret;
651 } 652 }