diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2023-02-22 19:39:02 -0500 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-22 17:09:54 -0400 |
commit | e9b70146545120f7d4bdba87eb8ec9a8f1669c7d (patch) | |
tree | 17b8426cbe69b2f689ced461682a1ca33c53be5c /fs/bcachefs/move.c | |
parent | 70ded998c5abef9907b8d42a5118dddd3de67160 (diff) | |
download | lwn-e9b70146545120f7d4bdba87eb8ec9a8f1669c7d.tar.gz lwn-e9b70146545120f7d4bdba87eb8ec9a8f1669c7d.zip |
bcachefs: Don't call bch2_trans_update() unlocked
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/move.c')
-rw-r--r-- | fs/bcachefs/move.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/bcachefs/move.c b/fs/bcachefs/move.c index c964643e7ebf..814ca33a15f6 100644 --- a/fs/bcachefs/move.c +++ b/fs/bcachefs/move.c @@ -226,7 +226,8 @@ static int bch2_extent_drop_ptrs(struct btree_trans *trans, if (bkey_deleted(&n->k)) n->k.size = 0; - return bch2_trans_update(trans, iter, n, BTREE_UPDATE_INTERNAL_SNAPSHOT_NODE) ?: + return bch2_trans_relock(trans) ?: + bch2_trans_update(trans, iter, n, BTREE_UPDATE_INTERNAL_SNAPSHOT_NODE) ?: bch2_trans_commit(trans, NULL, NULL, BTREE_INSERT_NOFAIL); } |