[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZtZ2gygmwGSAuPgS@debian>
Date: Tue, 3 Sep 2024 10:37:55 +0800
From: Gao Xiang <xiang@...nel.org>
To: Yiyang Wu <toolmanp@...p.cc>
Cc: linux-erofs@...ts.ozlabs.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH V4 2/2] erofs: refactor read_inode calling convention
On Mon, Sep 02, 2024 at 05:54:22PM +0800, Gao Xiang wrote:
>
>
> On 2024/9/2 17:34, Yiyang Wu wrote:
> > Refactor out the iop binding behavior out of the erofs_fill_symlink
> > and move erofs_buf into the erofs_read_inode, so that erofs_fill_inode
> > can only deal with inode operation bindings and can be decoupled from
> > metabuf operations. This results in better calling conventions.
> >
> > Note that after this patch, we do not need erofs_buf and ofs as
> > parameters any more when calling erofs_read_inode as
> > all the data operations are now included in itself.
> >
> > Suggested-by: Al Viro <viro@...iv.linux.org.uk>
> > Link: https://lore.kernel.org/all/20240425222847.GN2118490@ZenIV/
> > Signed-off-by: Yiyang Wu <toolmanp@...p.cc>
>
> Reviewed-by: Gao Xiang <hsiangkao@...ux.alibaba.com>
>
> Thanks,
> Gao Xiang
Applied with the following minor cleanups:
diff --git a/fs/erofs/inode.c b/fs/erofs/inode.c
index 726a93a0413c..31d811b50291 100644
--- a/fs/erofs/inode.c
+++ b/fs/erofs/inode.c
@@ -16,9 +16,8 @@ static int erofs_fill_symlink(struct inode *inode, void *kaddr,
/* if it cannot be handled with fast symlink scheme */
if (vi->datalayout != EROFS_INODE_FLAT_INLINE ||
- inode->i_size >= bsz || inode->i_size < 0) {
+ inode->i_size >= bsz || inode->i_size < 0)
return 0;
- }
m_pofs += vi->xattr_isize;
/* inline symlink data shouldn't cross block boundary */
@@ -204,7 +203,7 @@ static int erofs_read_inode(struct inode *inode)
static int erofs_fill_inode(struct inode *inode)
{
struct erofs_inode *vi = EROFS_I(inode);
- int err = 0;
+ int err;
trace_erofs_fill_inode(inode);
Powered by blists - more mailing lists