Re: [PATCH 2/5] ubifs: reject xattr inodes whose size does not match the value

From: shao.mingyin

Date: Mon Nov 02 2026 - 23:31:20 EST


> Above two ui->xattr check could be merged like:
> if (ui->xattr) {
> if (!S_ISREG(inode->i_mode))
> return 5;
>
> if (inode->i_size != ui->data_len)
> return 6;
> }

Agreed, that is cleaner. v2 folds the size check into the existing
ui->xattr block, with the mode check first, and keeps error codes 5 and 6.

Thanks,
Shao