aboutsummaryrefslogtreecommitdiff
path: root/fs/bcachefs/inode.h
diff options
context:
space:
mode:
authorGravatar Kent Overstreet <kent.overstreet@linux.dev> 2022-11-23 20:28:15 -0500
committerGravatar Kent Overstreet <kent.overstreet@linux.dev> 2023-10-22 17:09:46 -0400
commitabb936fb9f2ab4a447a266477d65e50d476277a5 (patch)
treefaa4c9a4d7ba0f2da2215b76f74fc98d8e0cb5df /fs/bcachefs/inode.h
parentbcachefs: Better inlining in bch2_subvolume_get_snapshot() (diff)
downloadlinux-abb936fb9f2ab4a447a266477d65e50d476277a5.tar.gz
linux-abb936fb9f2ab4a447a266477d65e50d476277a5.tar.bz2
linux-abb936fb9f2ab4a447a266477d65e50d476277a5.zip
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/inode.h')
-rw-r--r--fs/bcachefs/inode.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/bcachefs/inode.h b/fs/bcachefs/inode.h
index 9ea0d575a183..27744f78ae96 100644
--- a/fs/bcachefs/inode.h
+++ b/fs/bcachefs/inode.h
@@ -187,4 +187,6 @@ static inline void bch2_inode_nlink_set(struct bch_inode_unpacked *bi,
int bch2_inode_nlink_inc(struct bch_inode_unpacked *);
void bch2_inode_nlink_dec(struct btree_trans *, struct bch_inode_unpacked *);
+struct bch_opts bch2_inode_opts_to_opts(struct bch_inode_unpacked *);
+
#endif /* _BCACHEFS_INODE_H */