From nobody Thu Sep 18 09:36:24 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id D6AD9C4708D for ; Thu, 8 Dec 2022 02:12:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229898AbiLHCMB (ORCPT ); Wed, 7 Dec 2022 21:12:01 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42848 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229701AbiLHCLp (ORCPT ); Wed, 7 Dec 2022 21:11:45 -0500 Received: from dggsgout11.his.huawei.com (dggsgout11.his.huawei.com [45.249.212.51]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3411192FD0; Wed, 7 Dec 2022 18:11:44 -0800 (PST) Received: from mail02.huawei.com (unknown [172.30.67.153]) by dggsgout11.his.huawei.com (SkyGuard) with ESMTP id 4NSHhV5GS9z4f3jLy; Thu, 8 Dec 2022 10:11:38 +0800 (CST) Received: from huaweicloud.com (unknown [10.175.127.227]) by APP4 (Coremail) with SMTP id gCh0CgB3m9jbR5Fjj5BiBw--.22193S7; Thu, 08 Dec 2022 10:11:41 +0800 (CST) From: Ye Bin To: tytso@mit.edu, adilger.kernel@dilger.ca, linux-ext4@vger.kernel.org Cc: linux-kernel@vger.kernel.org, jack@suse.cz, Ye Bin Subject: [PATCH v3 3/4] ext4: rename xattr_find_entry() and __xattr_check_inode() Date: Thu, 8 Dec 2022 10:32:32 +0800 Message-Id: <20221208023233.1231330-4-yebin@huaweicloud.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20221208023233.1231330-1-yebin@huaweicloud.com> References: <20221208023233.1231330-1-yebin@huaweicloud.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-CM-TRANSID: gCh0CgB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EfUUUUU X-CM-SenderInfo: p1hex046kxt4xhlfz01xgou0bp/ X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Ye Bin Prepend ext4 prefix to function names of xattr_find_entry() and __xattr_check_inode() for consistency with other functions in ext4 xattr module. Signed-off-by: Ye Bin Reviewed-by: Jan Kara --- fs/ext4/xattr.c | 35 ++++++++++++++++++----------------- 1 file changed, 18 insertions(+), 17 deletions(-) diff --git a/fs/ext4/xattr.c b/fs/ext4/xattr.c index 23cfefc6d262..99dacb0393fa 100644 --- a/fs/ext4/xattr.c +++ b/fs/ext4/xattr.c @@ -260,8 +260,9 @@ __ext4_xattr_check_block(struct inode *inode, struct bu= ffer_head *bh, =20 =20 static int -__xattr_check_inode(struct inode *inode, struct ext4_xattr_ibody_header *h= eader, - void *end, const char *function, unsigned int line) +__ext4_xattr_check_inode(struct inode *inode, + struct ext4_xattr_ibody_header *header, void *end, + const char *function, unsigned int line) { int error =3D -EFSCORRUPTED; =20 @@ -276,12 +277,12 @@ __xattr_check_inode(struct inode *inode, struct ext4_= xattr_ibody_header *header, return error; } =20 -#define xattr_check_inode(inode, header, end) \ - __xattr_check_inode((inode), (header), (end), __func__, __LINE__) +#define ext4_xattr_check_inode(inode, header, end) \ + __ext4_xattr_check_inode((inode), (header), (end), __func__, __LINE__) =20 static int -xattr_find_entry(struct inode *inode, struct ext4_xattr_entry **pentry, - void *end, int name_index, const char *name, int sorted) +ext4_xattr_find_entry(struct inode *inode, struct ext4_xattr_entry **pentr= y, + void *end, int name_index, const char *name, int sorted) { struct ext4_xattr_entry *entry, *next; size_t name_len; @@ -554,7 +555,7 @@ ext4_xattr_block_get(struct inode *inode, int name_inde= x, const char *name, ext4_xattr_block_cache_insert(ea_block_cache, bh); entry =3D BFIRST(bh); end =3D bh->b_data + bh->b_size; - error =3D xattr_find_entry(inode, &entry, end, name_index, name, 1); + error =3D ext4_xattr_find_entry(inode, &entry, end, name_index, name, 1); if (error) goto cleanup; size =3D le32_to_cpu(entry->e_value_size); @@ -605,11 +606,11 @@ ext4_xattr_ibody_get(struct inode *inode, int name_in= dex, const char *name, raw_inode =3D ext4_raw_inode(&iloc); header =3D IHDR(inode, raw_inode); end =3D (void *)raw_inode + EXT4_SB(inode->i_sb)->s_inode_size; - error =3D xattr_check_inode(inode, header, end); + error =3D ext4_xattr_check_inode(inode, header, end); if (error) goto cleanup; entry =3D IFIRST(header); - error =3D xattr_find_entry(inode, &entry, end, name_index, name, 0); + error =3D ext4_xattr_find_entry(inode, &entry, end, name_index, name, 0); if (error) goto cleanup; size =3D le32_to_cpu(entry->e_value_size); @@ -750,7 +751,7 @@ ext4_xattr_ibody_list(struct dentry *dentry, char *buff= er, size_t buffer_size) raw_inode =3D ext4_raw_inode(&iloc); header =3D IHDR(inode, raw_inode); end =3D (void *)raw_inode + EXT4_SB(inode->i_sb)->s_inode_size; - error =3D xattr_check_inode(inode, header, end); + error =3D ext4_xattr_check_inode(inode, header, end); if (error) goto cleanup; error =3D ext4_xattr_list_entries(dentry, IFIRST(header), @@ -836,7 +837,7 @@ int ext4_get_inode_usage(struct inode *inode, qsize_t *= usage) raw_inode =3D ext4_raw_inode(&iloc); header =3D IHDR(inode, raw_inode); end =3D (void *)raw_inode + EXT4_SB(inode->i_sb)->s_inode_size; - ret =3D xattr_check_inode(inode, header, end); + ret =3D ext4_xattr_check_inode(inode, header, end); if (ret) goto out; =20 @@ -1839,8 +1840,8 @@ ext4_xattr_block_find(struct inode *inode, struct ext= 4_xattr_info *i, bs->s.first =3D BFIRST(bs->bh); bs->s.end =3D bs->bh->b_data + bs->bh->b_size; bs->s.here =3D bs->s.first; - error =3D xattr_find_entry(inode, &bs->s.here, bs->s.end, - i->name_index, i->name, 1); + error =3D ext4_xattr_find_entry(inode, &bs->s.here, bs->s.end, + i->name_index, i->name, 1); if (error && error !=3D -ENODATA) return error; bs->s.not_found =3D error; @@ -2199,12 +2200,12 @@ int ext4_xattr_ibody_find(struct inode *inode, stru= ct ext4_xattr_info *i, is->s.here =3D is->s.first; is->s.end =3D (void *)raw_inode + EXT4_SB(inode->i_sb)->s_inode_size; if (ext4_test_inode_state(inode, EXT4_STATE_XATTR)) { - error =3D xattr_check_inode(inode, header, is->s.end); + error =3D ext4_xattr_check_inode(inode, header, is->s.end); if (error) return error; /* Find the named attribute. */ - error =3D xattr_find_entry(inode, &is->s.here, is->s.end, - i->name_index, i->name, 0); + error =3D ext4_xattr_find_entry(inode, &is->s.here, is->s.end, + i->name_index, i->name, 0); if (error && error !=3D -ENODATA) return error; is->s.not_found =3D error; @@ -2719,7 +2720,7 @@ int ext4_expand_extra_isize_ea(struct inode *inode, i= nt new_extra_isize, min_offs =3D end - base; total_ino =3D sizeof(struct ext4_xattr_ibody_header) + sizeof(u32); =20 - error =3D xattr_check_inode(inode, header, end); + error =3D ext4_xattr_check_inode(inode, header, end); if (error) goto cleanup; =20 --=20 2.31.1