diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2022-10-17 07:09:02 -0400 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-22 17:09:44 -0400 |
commit | 3e8b4b3afedc4757c2d8aaad9a900e98a453d110 (patch) | |
tree | 8e94568340709cdb3392949fff4547628a2f959b /fs/bcachefs/inode.c | |
parent | adf16c6dfa279fee088a85bac9d602f282699915 (diff) | |
download | lwn-3e8b4b3afedc4757c2d8aaad9a900e98a453d110.tar.gz lwn-3e8b4b3afedc4757c2d8aaad9a900e98a453d110.zip |
bcachefs: Inline bch2_inode_pack()
It's mainly used from bch2_inode_write(), so inline it there.
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/inode.c')
-rw-r--r-- | fs/bcachefs/inode.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/fs/bcachefs/inode.c b/fs/bcachefs/inode.c index 99987db87ab6..18cfad860ddf 100644 --- a/fs/bcachefs/inode.c +++ b/fs/bcachefs/inode.c @@ -60,9 +60,9 @@ static int inode_decode_field(const u8 *in, const u8 *end, return bytes; } -void bch2_inode_pack(struct bch_fs *c, - struct bkey_inode_buf *packed, - const struct bch_inode_unpacked *inode) +static inline void bch2_inode_pack_inlined(struct bch_fs *c, + struct bkey_inode_buf *packed, + const struct bch_inode_unpacked *inode) { struct bkey_i_inode_v2 *k = &packed->inode; u8 *out = k->v.fields; @@ -130,6 +130,13 @@ void bch2_inode_pack(struct bch_fs *c, } } +void bch2_inode_pack(struct bch_fs *c, + struct bkey_inode_buf *packed, + const struct bch_inode_unpacked *inode) +{ + bch2_inode_pack_inlined(c, packed, inode); +} + static noinline int bch2_inode_unpack_v1(struct bkey_s_c_inode inode, struct bch_inode_unpacked *unpacked) { @@ -288,7 +295,7 @@ int bch2_inode_write(struct btree_trans *trans, if (IS_ERR(inode_p)) return PTR_ERR(inode_p); - bch2_inode_pack(trans->c, inode_p, inode); + bch2_inode_pack_inlined(trans->c, inode_p, inode); inode_p->inode.k.p.snapshot = iter->snapshot; return bch2_trans_update(trans, iter, &inode_p->inode.k_i, 0); } |