summaryrefslogtreecommitdiff
path: root/fs/bcachefs/opts.c
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@linux.dev>2022-11-24 04:28:15 +0300
committerKent Overstreet <kent.overstreet@linux.dev>2023-10-23 00:09:46 +0300
commitabb936fb9f2ab4a447a266477d65e50d476277a5 (patch)
treefaa4c9a4d7ba0f2da2215b76f74fc98d8e0cb5df /fs/bcachefs/opts.c
parent98638ffa1d914e780a527c0bd92323f0b7307f09 (diff)
downloadlinux-abb936fb9f2ab4a447a266477d65e50d476277a5.tar.xz
bcachefs: Improve bch2_inode_opts_to_opts()
It turns out the *_defined entries of bch_io_opts are only used in one place - in the xattr get path - and there we immediately convert to a bch_opts struct, which also has the *_defined entries. This patch changes bch2_inode_opts_to_opts() to go directly from bch_inode_unpacked to bch_opts, which is a minor simplification and will also let us slim down struct bch_io_opts in another patch. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/opts.c')
-rw-r--r--fs/bcachefs/opts.c11
1 files changed, 0 insertions, 11 deletions
diff --git a/fs/bcachefs/opts.c b/fs/bcachefs/opts.c
index 98568f21d6d0..9c49d543b062 100644
--- a/fs/bcachefs/opts.c
+++ b/fs/bcachefs/opts.c
@@ -540,17 +540,6 @@ struct bch_io_opts bch2_opts_to_inode_opts(struct bch_opts src)
return ret;
}
-struct bch_opts bch2_inode_opts_to_opts(struct bch_io_opts src)
-{
- struct bch_opts ret = { 0 };
-#define x(_name, _bits) \
- if (opt_defined(src, _name)) \
- opt_set(ret, _name, src._name);
- BCH_INODE_OPTS()
-#undef x
- return ret;
-}
-
void bch2_io_opts_apply(struct bch_io_opts *dst, struct bch_io_opts src)
{
#define x(_name, _bits) \