diff options
| author | Joseph Qi <joseph.qi@linux.alibaba.com> | 2026-09-22 17:42:52 +0800 |
|---|---|---|
| committer | Andrew Morton <akpm@linux-foundation.org> | 2026-10-13 21:25:46 -0700 |
| commit | 60f50cdd5ac54bcbc21a4b01b1c2f6409d4563a7 (patch) | |
| tree | 41288d04ba808b8f3da61b7638e8896fd9adc16d /rust/kernel/alloc/kvec | |
| parent | aabe6e1b36cee51c778e5acfbc824bbb81c9967a (diff) | |
ocfs2: restore -ERANGE check in ocfs2_xattr_tree_list_index_block()
ocfs2_xattr_list_entry() returns -ERANGE when the buffer handed in by the
caller is too small to hold the whole xattr name list. That is the normal
listxattr(2) protocol, userspace simply retries with a larger buffer, so
it is not an ocfs2 error and must not be logged as one.
Commit a46fa684fcb700 ("ocfs2: Don't printk the error when listing too
many xattrs.") already knew this and silenced two sites, quoting
(27738,0):ocfs2_iterate_xattr_buckets:3158 ERROR: status = -34
(27738,0):ocfs2_xattr_tree_list_index_block:3264 ERROR: status = -34
The refactoring in commit 47bca4950bc40f ("ocfs2: Abstract ocfs2 xattr
tree extend rec iteration process.") then rewrote
ocfs2_xattr_tree_list_index_block() around the new
ocfs2_iterate_xattr_index_block() helper and dropped that guard, so the
second message has been emitted ever since:
ocfs2_xattr_tree_list_index_block:4513 ERROR: status = -34
The exemption in ocfs2_iterate_xattr_buckets() survived because that
function was left alone, and the new helper does check for -ERANGE itself,
which is why only the outermost caller still logs it.
Restore the missing check. Only the log line changes: -ERANGE is still
returned to the VFS untouched, so listxattr(2) behaves exactly as before.
Link: https://lore.kernel.org/20260922094252.971631-1-joseph.qi@linux.alibaba.com
Signed-off-by: Joseph Qi <joseph.qi@linux.alibaba.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Cc: Heming Zhao <heming.zhao@suse.com>
Cc: Mark Fasheh <mark@fasheh.com>
Cc: Joel Becker <jlbec@evilplan.org>
Cc: Junxiao Bi <junxiao.bi@oracle.com>
Diffstat (limited to 'rust/kernel/alloc/kvec')
0 files changed, 0 insertions, 0 deletions
