From patchwork Thu Jan 11 08:13:35 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: piaojun X-Patchwork-Id: 10157455 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 3542D605BA for ; Thu, 11 Jan 2018 08:14:40 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 27E8F286AB for ; Thu, 11 Jan 2018 08:14:40 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1BD2828700; Thu, 11 Jan 2018 08:14:40 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID autolearn=ham version=3.3.1 Received: from aserp2130.oracle.com (aserp2130.oracle.com [141.146.126.79]) (using TLSv1.2 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id EFFD2286AB for ; Thu, 11 Jan 2018 08:14:38 +0000 (UTC) Received: from pps.filterd (aserp2130.oracle.com [127.0.0.1]) by aserp2130.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w0B8CNmd056491; Thu, 11 Jan 2018 08:14:07 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=to : from : message-id : date : mime-version : cc : subject : list-id : list-unsubscribe : list-archive : list-post : list-help : list-subscribe : content-type : content-transfer-encoding : sender; s=corp-2017-10-26; bh=XCNsdf1HeECmCm1OidwjBOf5jn80CaPd3AHnSkDJYRs=; b=CpNSWx+WGW/x6hegCPS8N35/ncm6oPdkmdNJxpHuyKKFsg9rs7sR1i+NLpYDyOHq4Xft hLWCmD7fGUKB4ABypuYPMn9GJViI0arsH6KB+hVBRQrmy0FrYjJx1yC2dLJWF5ZgM48u bbmD00CDu/T+1R9vlm+TbCLBJslM4oidyexduZ6cltqlR75vnzUy2mLAlBoIiIWpBUSk xhy6rFFM/rLgHnCL4ijVbCD1Bt2mxWyGj9T40ryy43itPyAnBz8bHOgpEPGuWwlckRE8 YlY9XeSuDBNLqKEBpSMWddX9Kb729MVxh3+7yIsJ6+/QgByUlaz5ExnqnlpsSn0aA4xe QA== Received: from aserv0022.oracle.com (aserv0022.oracle.com [141.146.126.234]) by aserp2130.oracle.com with ESMTP id 2fe3jeg47c-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 11 Jan 2018 08:14:07 +0000 Received: from oss.oracle.com (oss-old-reserved.oracle.com [137.254.22.2]) by aserv0022.oracle.com (8.14.4/8.14.4) with ESMTP id w0B8E5bf025157 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 11 Jan 2018 08:14:05 GMT Received: from localhost ([127.0.0.1] helo=lb-oss.oracle.com) by oss.oracle.com with esmtp (Exim 4.63) (envelope-from ) id 1eZXzx-000184-PP; Thu, 11 Jan 2018 00:14:05 -0800 Received: from userv0022.oracle.com ([156.151.31.74]) by oss.oracle.com with esmtp (Exim 4.63) (envelope-from ) id 1eZXzv-00017W-7O for ocfs2-devel@oss.oracle.com; Thu, 11 Jan 2018 00:14:03 -0800 Received: from userp2030.oracle.com (userp2030.oracle.com [156.151.31.89]) by userv0022.oracle.com (8.14.4/8.14.4) with ESMTP id w0B8E2uG010956 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=FAIL) for ; Thu, 11 Jan 2018 08:14:03 GMT Received: from pps.filterd (userp2030.oracle.com [127.0.0.1]) by userp2030.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w0B8Bo9g008237 for ; Thu, 11 Jan 2018 08:14:02 GMT Received: from huawei.com (szxga07-in.huawei.com [45.249.212.35] (may be forged)) by userp2030.oracle.com with ESMTP id 2fe1m8a7tv-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO) for ; Thu, 11 Jan 2018 08:13:57 +0000 Received: from DGGEMS412-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id 770C7403E58CA; Thu, 11 Jan 2018 16:13:50 +0800 (CST) Received: from [10.177.253.249] (10.177.253.249) by smtp.huawei.com (10.3.19.212) with Microsoft SMTP Server id 14.3.361.1; Thu, 11 Jan 2018 16:13:45 +0800 To: "akpm@linux-foundation.org" , Mark Fasheh , Joel Becker , Junxiao Bi From: piaojun Message-ID: <5A571CAF.8050709@huawei.com> Date: Thu, 11 Jan 2018 16:13:35 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 X-Originating-IP: [10.177.253.249] X-CFilter-Loop: Reflected X-CLX-Shades: MLX X-CLX-Response: 1TFkXGxIYEQpMehcbGRgRCllNF2dmchEKWUkXGnEaEBp3BhscGHEeGxAadwY YGgYaEQpZXhdobnkRCklGF0VYS0lGT3VaWEVOX0leQ0VEGXVPSxEKQ04Xb19GQ2dyZF9oHV4bGH pNGVNPf0x+bWl5f3xyaAdMGR8RClhcFx8EGgQbGBgHHEtIS08eHBoFGxoEGxoaBB4SBB8QGx4aH xoRCl5ZF3hAZ2xGEQpNXBcZHB8RCkxaF2hpQk17EQpDWhceHwQYHhMEGBsYBBkfEQpCXhcbEQpE XhcfEQpESRceEQpCRhdnE21gG1tlQh9+fREKQlwXGhEKQkUXZlxse3BkYnoSfEMRCkJOF2xCSFl TGk1leHgdEQpCTBdvSxkSEkRZeVsbXxEKQmwXYwVCUmZAYl5ae1IRCkJAF2seAXpEGnNNYkgFEQ pCWBdifW95AU8YGXBwexEKWlgXGBEKcGgXYV9HaEgZHxprQWkQGRoRCnBoF21EYllvXXgafVNiE BkaEQpwaBdvZWxPElhvQmBHThAZGhEKcGgXbF8BenxIE28caGAQGRoRCnBoF2JdTm55bX9LZVx5 EBkaEQpwbBdhSXlDenNJeGdsYhAZGhEKbX4XGhEKWE0XSxEg X-PDR: PASS X-Source-IP: 45.249.212.35 X-ServerName: [45.249.212.35] X-Proofpoint-SPF-Result: pass X-Proofpoint-SPF-Record: v=spf1 ip4:45.249.212.32 ip4:45.249.212.35 ip4:119.145.14.93 ip4:58.251.152.93 ip4:194.213.3.17 ip4:206.16.17.72 ip4:45.249.212.255 ip4:45.249.212.187/29 ip4:45.249.212.191 ~all X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=8770 signatures=668652 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=132 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=182 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=867 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1711220000 definitions=main-1801110115 X-Spam: Clean Cc: "ocfs2-devel@oss.oracle.com" Subject: [Ocfs2-devel] [PATCH] ocfs2/xattr: assign errno to 'ret' in ocfs2_calc_xattr_init() X-BeenThere: ocfs2-devel@oss.oracle.com X-Mailman-Version: 2.1.9 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: ocfs2-devel-bounces@oss.oracle.com Errors-To: ocfs2-devel-bounces@oss.oracle.com X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=8770 signatures=668652 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1711220000 definitions=main-1801110115 X-Virus-Scanned: ClamAV using ClamSMTP 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 Reviewed-by: Alex Chen Reviewed-by: Yiwen Jiang Reviewed-by: Gang He Acked-by: Changwei Ge --- 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; }