diff options
author | Zhihao Cheng <chengzhihao1@huawei.com> | 2021-12-27 11:22:39 +0800 |
---|---|---|
committer | Richard Weinberger <richard@nod.at> | 2022-01-10 22:18:42 +0100 |
commit | 1b83ec057db16b4d0697dc21ef7a9743b6041f72 (patch) | |
tree | 24c11d36fb252ab152d232ec1aa4ef0dd5d91e8d /fs/ubifs/io.c | |
parent | a6dab6607d4681d227905d5198710b575dbdb519 (diff) |
ubifs: setflags: Make dirtied_ino_d 8 bytes aligned
Make 'ui->data_len' aligned with 8 bytes before it is assigned to
dirtied_ino_d. Since 8871d84c8f8b0c6b("ubifs: convert to fileattr")
applied, 'setflags()' only affects regular files and directories, only
xattr inode, symlink inode and special inode(pipe/char_dev/block_dev)
have none- zero 'ui->data_len' field, so assertion
'!(req->dirtied_ino_d & 7)' cannot fail in ubifs_budget_space().
To avoid assertion fails in future evolution(eg. setflags can operate
special inodes), it's better to make dirtied_ino_d 8 bytes aligned,
after all aligned size is still zero for regular files.
Fixes: 1e51764a3c2ac05a ("UBIFS: add new flash file system")
Signed-off-by: Zhihao Cheng <chengzhihao1@huawei.com>
Signed-off-by: Richard Weinberger <richard@nod.at>
Diffstat (limited to 'fs/ubifs/io.c')
0 files changed, 0 insertions, 0 deletions