diff options
author | Jingbo Xu <[email protected]> | 2023-06-13 15:41:13 +0800 |
---|---|---|
committer | Gao Xiang <[email protected]> | 2023-06-18 12:10:54 +0800 |
commit | 4b077b501266c6c6784656cd8721db37c090c5df (patch) | |
tree | 5b345ff7b7e6beb9f95027d970f033b851b99316 /lib/test_fortify/write_overflow-strncpy.c | |
parent | 5a8ffb1975c5b6511a996383fce7ad0f97132a5c (diff) |
erofs: unify inline/shared xattr iterators for listxattr/getxattr
Make inline_{list,get}xattr() as well as inline_xattr_iter_begin()
unified as erofs_xattr_iter_inline(), and shared_{list,get}xattr()
unified as erofs_xattr_iter_shared().
After these changes, both erofs_xattr_iter_{inline,shared}() return 0 on
success, and negative error on failure.
One thing worth noting is that, the logic of returning it->buffer_ofs
when there's no shared xattrs in shared_listxattr() is moved to
erofs_listxattr() to make the unification possible. The only difference
is that, semantically the old behavior will return ENOATTR rather than
it->buffer_ofs if ENOATTR encountered when listxattr is parsing upon a
specific shared xattr, while now the new behavior will return
it->buffer_ofs in this case. This is not an issue, as listxattr upon a
specific xattr won't return ENOATTR.
Signed-off-by: Jingbo Xu <[email protected]>
Reviewed-by: Gao Xiang <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Gao Xiang <[email protected]>
Diffstat (limited to 'lib/test_fortify/write_overflow-strncpy.c')
0 files changed, 0 insertions, 0 deletions