From patchwork Mon Dec 11 06:24:08 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Chen X-Patchwork-Id: 10104277 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 C6C29602D8 for ; Mon, 11 Dec 2017 06:27:16 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B4D96293C1 for ; Mon, 11 Dec 2017 06:27:16 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A9D50293FB; Mon, 11 Dec 2017 06:27:16 +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 userp2130.oracle.com (userp2130.oracle.com [156.151.31.86]) (using TLSv1.2 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 26E4B293C1 for ; Mon, 11 Dec 2017 06:27:15 +0000 (UTC) Received: from pps.filterd (userp2130.oracle.com [127.0.0.1]) by userp2130.oracle.com (8.16.0.21/8.16.0.21) with SMTP id vBB6LtqU163771; Mon, 11 Dec 2017 06:24:39 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=message-id : date : from : mime-version : to : 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=pUcBO2nH+n8pLpX+1xNOpCBiDsqnHj7R8J3soCr4Ns0=; b=sw0Ufa8jAHG/zMfbnid3Sr1DGl+zs8UtQjKfobk4tgW45RxRTaBTc3ja9Wla+su6gISt i/JDDKqyJLSUGgKchTg5su1+2CmXHef0Wgm00FGynMeBDEVKaWZrv2hvFO+MRgz9f6ye Gm0fcRMHQujeiVC6j1hxM5KUyXN1Non2YlRHMnjcQY16qLUp2xdnrbBklbW4r2afkr43 t6MfM4lcQ6n9b+htB2qCF0vaf8d0XFu4rkvSe6BqbS1AlzdI5ozQVETlHj6xYrnOmqpL zZvDuyXqtcAjbx9Kf/FGua7qzyhpI+LhnFXPGrNLXx7noh2rPICLewvsdj3z8T0tsAz3 5g== Received: from aserv0022.oracle.com (aserv0022.oracle.com [141.146.126.234]) by userp2130.oracle.com with ESMTP id 2esmkcg1av-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 11 Dec 2017 06:24:38 +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 vBB6OYNf030669 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 11 Dec 2017 06:24:35 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 1eOHVy-0002J1-KE; Sun, 10 Dec 2017 22:24:34 -0800 Received: from aserv0022.oracle.com ([141.146.126.234]) by oss.oracle.com with esmtp (Exim 4.63) (envelope-from ) id 1eOHVv-0002Ir-VD for ocfs2-devel@oss.oracle.com; Sun, 10 Dec 2017 22:24:32 -0800 Received: from userp2040.oracle.com (userp2040.oracle.com [156.151.31.90]) by aserv0022.oracle.com (8.14.4/8.14.4) with ESMTP id vBB6OVVZ030546 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NO) for ; Mon, 11 Dec 2017 06:24:31 GMT Received: from pps.filterd (userp2040.oracle.com [127.0.0.1]) by userp2040.oracle.com (8.16.0.21/8.16.0.21) with SMTP id vBB6Ln3I023910 for ; Mon, 11 Dec 2017 06:24:31 GMT Received: from huawei.com (szxga07-in.huawei.com [45.249.212.35] (may be forged)) by userp2040.oracle.com with ESMTP id 2esgf2b5jb-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Mon, 11 Dec 2017 06:24:25 +0000 Received: from DGGEMS408-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id 2269676F484BD; Mon, 11 Dec 2017 14:24:19 +0800 (CST) Received: from [127.0.0.1] (10.177.26.59) by DGGEMS408-HUB.china.huawei.com (10.3.19.208) with Microsoft SMTP Server id 14.3.361.1; Mon, 11 Dec 2017 14:24:12 +0800 Message-ID: <5A2E2488.70301@huawei.com> Date: Mon, 11 Dec 2017 14:24:08 +0800 From: alex chen User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130509 Thunderbird/17.0.6 MIME-Version: 1.0 To: Andrew Morton , "ocfs2-devel@oss.oracle.com" X-Originating-IP: [10.177.26.59] X-CFilter-Loop: Reflected X-CLX-Shades: MLX X-CLX-Response: 1TFkXGxwfEQpMehcTHxEKWU0XZ2ZyEQpZSRcacRoQGncGGx4fcRgdEBp3Bhg aBhoRClleF2hueREKSUYXRVhLSUZPdVpYRU5fSV5DRUQZdU9LEQpDThd/TE5FbkN6GlBQZXwba3 oZQkQaWkJaZ0diYBJScHlCUxEKWFwXHwQaBBsYGAccS0hLTx4cGgUbGgQbGhoEHhIEHxAbHhofG hEKXlkXeHMSQRwRCk1cFxkbHhEKTFoXaGlCTV0RCkVZF2hrEQpNThdoEQpDWhceHwQYHhMEGBsY BBkfEQpCXhcbEQpEXhcZEQpESRcfEQpCRhdgU24eQxlzZ1hGZhEKQlwXGhEKQkUXYhJ9YhJiaxx Fa30RCkJOF2xCSFlTGk1leHgdEQpCTBdpAQEYbhlbGFJHehEKQmwXaxxCQ056SBxeekARCkJAF2 ASZFpAQVt5S2dTEQpCWBdifW95AU8YGXBwexEKWlgXGxEKcGgXYllgeXxdS0FjSH4QHhIRCnBoF 2BSEn9QbGZnGllkEBkaEQpwaBdgYERzc1pybUV5ZxAeEhEKcGgXYX9dYk1IUmYBc0IQHhIRCnBs F2ZBTmRTS1lyYHodEB4SEQptfhcaEQpYTRdLESA= 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=8741 signatures=668644 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=95 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=165 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1711220000 definitions=main-1712110098 X-Spam: Clean Subject: [Ocfs2-devel] [PATCH v2] ocfs2: using the OCFS2_XATTR_ROOT_SIZE macro in ocfs2_reflink_xattr_header() 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=8741 signatures=668644 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-1712110098 X-Virus-Scanned: ClamAV using ClamSMTP Using the OCFS2_XATTR_ROOT_SIZE macro improves the readability of the code. Signed-off-by: Alex Chen Reviewed-by: Jun Piao --- fs/ocfs2/xattr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 1.9.5.msysgit.1 diff --git a/fs/ocfs2/xattr.c b/fs/ocfs2/xattr.c index 5fdf269..ca3b61a 100644 --- a/fs/ocfs2/xattr.c +++ b/fs/ocfs2/xattr.c @@ -6415,7 +6415,7 @@ static int ocfs2_reflink_xattr_header(handle_t *handle, * and then insert the extents one by one. */ if (xv->xr_list.l_tree_depth) { - memcpy(new_xv, &def_xv, sizeof(def_xv)); + memcpy(new_xv, &def_xv, OCFS2_XATTR_ROOT_SIZE); vb->vb_xv = new_xv; vb->vb_bh = value_bh; ocfs2_init_xattr_value_extent_tree(&data_et,