From patchwork Mon Dec 11 06:03:03 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Chen X-Patchwork-Id: 10104251 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 1F33D60235 for ; Mon, 11 Dec 2017 06:04:20 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0AAE529417 for ; Mon, 11 Dec 2017 06:04:20 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id F259F2941C; Mon, 11 Dec 2017 06:04:19 +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 5270C29417 for ; Mon, 11 Dec 2017 06:04:18 +0000 (UTC) Received: from pps.filterd (aserp2130.oracle.com [127.0.0.1]) by aserp2130.oracle.com (8.16.0.21/8.16.0.21) with SMTP id vBB61xq6116911; Mon, 11 Dec 2017 06:04:02 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=message-id : date : from : mime-version : to : 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=pUcBO2nH+n8pLpX+1xNOpCBiDsqnHj7R8J3soCr4Ns0=; b=R4LwdivUhoRROCeEtcVKHG10YBkVR35Mi+htjIw4jZVilNFZ8Yid5aKc+Is2OMWA2x16 lvGcVpstYg38fhTiMG3qJEyk0Gbfg9nmVzwFm0eNOIw4Ak21g62EekCl8VxvQufdzCC5 67bazXVCgGBStx4GqsngC61kWk2jycsZkbR+okbcBFwGhiqESHrGKKjXRKeygW0B7hVF p/ZgUdxyrRkL7fB7wDUyIijCBeDYOwkH4I48eh4F2LioyvKtknosMMhL2eKE7bWdbS2y 25uWTEm4a4GDm81pgthGaQbgeuv2Adtit1c0n0Edlwp5Q8XCGqfQRCFTNag/1sWfANCH yQ== Received: from aserv0022.oracle.com (aserv0022.oracle.com [141.146.126.234]) by aserp2130.oracle.com with ESMTP id 2esm9s81pk-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 11 Dec 2017 06:04:01 +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 vBB63uTK017605 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 11 Dec 2017 06:03:57 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 1eOHC0-0001e6-7A; Sun, 10 Dec 2017 22:03:56 -0800 Received: from userv0021.oracle.com ([156.151.31.71]) by oss.oracle.com with esmtp (Exim 4.63) (envelope-from ) id 1eOHBZ-0001dI-Ps for ocfs2-devel@oss.oracle.com; Sun, 10 Dec 2017 22:03:30 -0800 Received: from userp2030.oracle.com (userp2030.oracle.com [156.151.31.89]) by userv0021.oracle.com (8.14.4/8.14.4) with ESMTP id vBB63TPX007209 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NO) for ; Mon, 11 Dec 2017 06:03:29 GMT Received: from pps.filterd (userp2030.oracle.com [127.0.0.1]) by userp2030.oracle.com (8.16.0.21/8.16.0.21) with SMTP id vBB62YJR003323 for ; Mon, 11 Dec 2017 06:03:29 GMT Received: from huawei.com (szxga05-in.huawei.com [45.249.212.191]) by userp2030.oracle.com with ESMTP id 2escjkdjdt-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Mon, 11 Dec 2017 06:03:28 +0000 Received: from DGGEMS414-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id 8D95F7ED3B62; Mon, 11 Dec 2017 14:03:13 +0800 (CST) Received: from [127.0.0.1] (10.177.26.59) by DGGEMS414-HUB.china.huawei.com (10.3.19.214) with Microsoft SMTP Server id 14.3.361.1; Mon, 11 Dec 2017 14:03:07 +0800 Message-ID: <5A2E1F97.5010906@huawei.com> Date: Mon, 11 Dec 2017 14:03:03 +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: 1TFkXGxwbEQpMehcTHxEKWU0XZ2ZyEQpZSRcacRoQGncGGx4bcR8aEBp3Bhg aBhoRClleF2hueREKSUYXRVhLSUZPdVpYRU5fSV5DRUQZdU9LEQpDThdSQh5dclNvckFhGRNAYn 9YWmFven8YQnkHWE1bZ2seRxEKWFwXHwQaBBsYGAccS0hLTx4cGgUbGgQbGhoEHhIEHxAbHhofG hEKXlkXeHMSeGcRCk1cFxkYHREKTFoXaGlCTV0RCkVZF2hrEQpNThdoEQpDWhceHwQYHhMEGBsY BBsTGxEKQl4XGxEKRF4XGREKREkXHxEKQkYXZxNtYBtbZUIffn0RCkJcFxoRCkJFF2ISfWISYms cRWt9EQpCThdsQkhZUxpNZXh4HREKQkwXaQEBGG4ZWxhSR3oRCkJsF2scQkNOekgcXnpAEQpCQB dkZG5zZVhOR2YFUhEKQlgXYn1veQFPGBlwcHsRClpYFxsRCnBoF2JZYHl8XUtBY0h+EBkaEQpwa BdgUhJ/UGxmZxpZZBAZGhEKcGgXYGBEc3Nacm1FeWcQGRoRCnBoF2F/XWJNSFJmAXNCEBkaEQpw bBdmQU5kU0tZcmB6HRAZGhEKbX4XGhEKWE0XSxEg X-PDR: PASS X-Source-IP: 45.249.212.191 X-ServerName: szxga05-in.huawei.com 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=161 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-1712110092 X-Spam: Clean Cc: Joseph Qi Subject: [Ocfs2-devel] [PATCH] 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-1712110092 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 Reviewed-by: Gang He --- 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,