From nobody Sun Feb 8 19:54:58 2026 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 640FBC77B7A for ; Tue, 13 Jun 2023 07:41:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239225AbjFMHl2 (ORCPT ); Tue, 13 Jun 2023 03:41:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39704 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235289AbjFMHlW (ORCPT ); Tue, 13 Jun 2023 03:41:22 -0400 Received: from out30-113.freemail.mail.aliyun.com (out30-113.freemail.mail.aliyun.com [115.124.30.113]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 66D0AAA for ; Tue, 13 Jun 2023 00:41:21 -0700 (PDT) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R161e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018045176;MF=jefflexu@linux.alibaba.com;NM=1;PH=DS;RN=5;SR=0;TI=SMTPD_---0Vl18Ncv_1686642077; Received: from localhost(mailfrom:jefflexu@linux.alibaba.com fp:SMTPD_---0Vl18Ncv_1686642077) by smtp.aliyun-inc.com; Tue, 13 Jun 2023 15:41:18 +0800 From: Jingbo Xu To: xiang@kernel.org, chao@kernel.org, huyue2@coolpad.com, linux-erofs@lists.ozlabs.org Cc: linux-kernel@vger.kernel.org Subject: [PATCH v8 3/5] erofs: make the size of read data stored in buffer_ofs Date: Tue, 13 Jun 2023 15:41:12 +0800 Message-Id: <20230613074114.120115-4-jefflexu@linux.alibaba.com> X-Mailer: git-send-email 2.19.1.6.gb485710b In-Reply-To: <20230613074114.120115-1-jefflexu@linux.alibaba.com> References: <20230613074114.120115-1-jefflexu@linux.alibaba.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" Since now xattr_iter structures have been unified, make the size of the read data stored in buffer_ofs. Don't bother reusing buffer_size for this use, which may be confusing. This is in preparation for the following further cleanup. Signed-off-by: Jingbo Xu Reviewed-by: Gao Xiang --- fs/erofs/xattr.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/fs/erofs/xattr.c b/fs/erofs/xattr.c index b2802121e3aa..8a114c7b6c66 100644 --- a/fs/erofs/xattr.c +++ b/fs/erofs/xattr.c @@ -315,7 +315,7 @@ static int xattr_checkbuffer(struct erofs_xattr_iter *i= t, { int err =3D it->buffer_size < value_sz ? -ERANGE : 0; =20 - it->buffer_size =3D value_sz; + it->buffer_ofs =3D value_sz; return !it->buffer ? 1 : err; } =20 @@ -348,7 +348,7 @@ static int inline_getxattr(struct inode *inode, struct = erofs_xattr_iter *it) if (ret !=3D -ENOATTR) break; } - return ret ? ret : it->buffer_size; + return ret ? ret : it->buffer_ofs; } =20 static int shared_getxattr(struct inode *inode, struct erofs_xattr_iter *i= t) @@ -371,7 +371,7 @@ static int shared_getxattr(struct inode *inode, struct = erofs_xattr_iter *it) if (ret !=3D -ENOATTR) break; } - return ret ? ret : it->buffer_size; + return ret ? ret : it->buffer_ofs; } =20 static bool erofs_xattr_user_list(struct dentry *dentry) --=20 2.19.1.6.gb485710b