mirror of
https://github.com/versity/scoutfs.git
synced 2026-08-27 19:36:52 +00:00
scoutfs: allow xattrs with 0 length values
xattrs can have 0 lenth values so fix the item iterator to emit a single item in the case where the size is 0. Signed-off-by: Zach Brown <zab@versity.com>
This commit is contained in:
+1
-1
@@ -118,7 +118,7 @@ static void set_xattr_key_part(struct scoutfs_key_buf *key, u8 part)
|
||||
*/
|
||||
#define for_each_xattr_item(key, val, vh, buffer, size, part, off, bytes) \
|
||||
for (part = 0, off = 0; \
|
||||
off < size && \
|
||||
((off < size) || (part == 0 && size == 0)) && \
|
||||
(bytes = min_t(size_t, SCOUTFS_XATTR_PART_SIZE, size - off), \
|
||||
set_xattr_key_part(key, part), \
|
||||
(vh)->part_len = cpu_to_le16(bytes), \
|
||||
|
||||
Reference in New Issue
Block a user