[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230518024551.123990-4-jefflexu@linux.alibaba.com>
Date: Thu, 18 May 2023 10:45:49 +0800
From: Jingbo Xu <jefflexu@...ux.alibaba.com>
To: xiang@...nel.org, chao@...nel.org, huyue2@...lpad.com,
linux-erofs@...ts.ozlabs.org
Cc: linux-kernel@...r.kernel.org
Subject: [PATCH v3 3/5] erofs: make the size of read data stored in buffer_ofs
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 <jefflexu@...ux.alibaba.com>
---
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 1e44aa108134..87d76ccea692 100644
--- a/fs/erofs/xattr.c
+++ b/fs/erofs/xattr.c
@@ -338,7 +338,7 @@ static int xattr_checkbuffer(struct erofs_xattr_iter *it,
{
int err = it->buffer_size < value_sz ? -ERANGE : 0;
- it->buffer_size = value_sz;
+ it->buffer_ofs = value_sz;
return !it->buffer ? 1 : err;
}
@@ -371,7 +371,7 @@ static int inline_getxattr(struct inode *inode, struct erofs_xattr_iter *it)
if (ret != -ENOATTR)
break;
}
- return ret ? ret : it->buffer_size;
+ return ret ? ret : it->buffer_ofs;
}
static int shared_getxattr(struct inode *inode, struct erofs_xattr_iter *it)
@@ -393,7 +393,7 @@ static int shared_getxattr(struct inode *inode, struct erofs_xattr_iter *it)
if (ret != -ENOATTR)
break;
}
- return ret ? ret : it->buffer_size;
+ return ret ? ret : it->buffer_ofs;
}
static bool erofs_xattr_user_list(struct dentry *dentry)
--
2.19.1.6.gb485710b
Powered by blists - more mailing lists