summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoxana Nicolescu <nicolescu.roxana@protonmail.com>2025-03-11 15:06:10 +0000
committerKent Overstreet <kent.overstreet@linux.dev>2025-03-11 11:19:33 -0400
commit58517f4df8424ec28dfe7290ccc61908eda57aae (patch)
treec3832757e19ca3aa01bf92021d76f4fcb7dcf130
parent3a04334d6282d08fbdd6201e374db17d31927ba3 (diff)
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: 7a7c43a0c1ecf ("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>
-rw-r--r--fs/bcachefs/inode.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/bcachefs/inode.c b/fs/bcachefs/inode.c
index 04ec05206f8c..339b80770f1d 100644
--- a/fs/bcachefs/inode.c
+++ b/fs/bcachefs/inode.c
@@ -1198,6 +1198,7 @@ void bch2_inode_opts_get(struct bch_io_opts *opts, struct bch_fs *c,
opts->_name##_from_inode = true; \
} else { \
opts->_name = c->opts._name; \
+ opts->_name##_from_inode = false; \
}
BCH_INODE_OPTS()
#undef x