Skip to content

Commit 58517f4

Browse files
roxanan1996Kent Overstreet
authored andcommitted
bcachefs: Initialize from_inode members for bch_io_opts
When there is no inode source, all "from_inode" members in the structure bhc_io_opts should be set false. Fixes: 7a7c43a ("bcachefs: Add bch_io_opts fields for indicating whether the opts came from the inode") Reported-by: syzbot+c17ad4b4367b72a853cb@syzkaller.appspotmail.com Closes: https://syzkaller.appspot.com/bug?extid=c17ad4b4367b72a853cb Signed-off-by: Roxana Nicolescu <nicolescu.roxana@protonmail.com> Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
1 parent 3a04334 commit 58517f4

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

fs/bcachefs/inode.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1198,6 +1198,7 @@ void bch2_inode_opts_get(struct bch_io_opts *opts, struct bch_fs *c,
11981198
opts->_name##_from_inode = true; \
11991199
} else { \
12001200
opts->_name = c->opts._name; \
1201+
opts->_name##_from_inode = false; \
12011202
}
12021203
BCH_INODE_OPTS()
12031204
#undef x

0 commit comments

Comments
 (0)