summaryrefslogtreecommitdiff
path: root/fs/erofs
diff options
context:
space:
mode:
authorJingbo Xu <jefflexu@linux.alibaba.com>2023-06-13 10:41:12 +0300
committerGao Xiang <hsiangkao@linux.alibaba.com>2023-06-18 07:10:54 +0300
commit5a8ffb1975c5b6511a996383fce7ad0f97132a5c (patch)
tree4a9c6db40866fd4eca33e89a3c6b8b0d63855123 /fs/erofs
parent8e823961de5a3b502f47a5461954024cc1433147 (diff)
downloadlinux-5a8ffb1975c5b6511a996383fce7ad0f97132a5c.tar.xz
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@linux.alibaba.com> Reviewed-by: Gao Xiang <hsiangkao@linux.alibaba.com> Link: https://lore.kernel.org/r/20230613074114.120115-4-jefflexu@linux.alibaba.com Signed-off-by: Gao Xiang <hsiangkao@linux.alibaba.com>
Diffstat (limited to 'fs/erofs')
-rw-r--r--fs/erofs/xattr.c6
1 files 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 *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;
}
@@ -348,7 +348,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)
@@ -371,7 +371,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)