diff options
| author | Kent Overstreet <kent.overstreet@linux.dev> | 2023-04-30 18:46:24 -0400 |
|---|---|---|
| committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-22 17:10:01 -0400 |
| commit | f12a798a898dec36de9705d40a1b03e2418aabe0 (patch) | |
| tree | 3b2a09b833e6034f34e2d9aefd8794fb67080c5d /fs/bcachefs/io.c | |
| parent | f8cb35fda161715e384df340f0bae4de37c5576f (diff) | |
bcachefs: bch2_bkey_get_mut() now calls bch2_trans_update()
It's safe to call bch2_trans_update with a k/v pair where the value
hasn't been filled out, as long as the key part has been and the value
is filled out by transaction commit time.
This patch folds the bch2_trans_update() call into bch2_bkey_get_mut(),
eliminating a bit of boilerplate.
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/io.c')
| -rw-r--r-- | fs/bcachefs/io.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/bcachefs/io.c b/fs/bcachefs/io.c index c0471a4144ff..46dc166d23d5 100644 --- a/fs/bcachefs/io.c +++ b/fs/bcachefs/io.c @@ -257,7 +257,7 @@ static inline int bch2_extent_update_i_size_sectors(struct btree_trans *trans, unsigned inode_update_flags = BTREE_UPDATE_NOJOURNAL; int ret; - k = bch2_bkey_get_mut(trans, &iter, BTREE_ID_inodes, + k = bch2_bkey_get_mut_noupdate(trans, &iter, BTREE_ID_inodes, SPOS(0, extent_iter->pos.inode, extent_iter->snapshot), |
