aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@linux.dev>2024-01-22 18:08:51 -0500
committerKent Overstreet <kent.overstreet@linux.dev>2024-01-24 17:27:46 -0500
commit096386a5bcf02e4053dc8b6cacb09a8493eeee4f (patch)
treedb441c5f817bab587c28f8e515d0f849a0ddf333
parent3e44f325f6f75078cdcd44cd337f517ba3650d05 (diff)
downloadlinux-096386a5bcf02e4053dc8b6cacb09a8493eeee4f.tar.gz
bcachefs: discard path uses unlock_long()
Some (bad) devices can have really terrible discard latency; we don't want them blocking memory reclaim and causing warnings. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
-rw-r--r--fs/bcachefs/alloc_background.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/bcachefs/alloc_background.c b/fs/bcachefs/alloc_background.c
index 10704f2d3af530..fd3e175d834232 100644
--- a/fs/bcachefs/alloc_background.c
+++ b/fs/bcachefs/alloc_background.c
@@ -1715,7 +1715,7 @@ static int bch2_discard_one_bucket(struct btree_trans *trans,
* This works without any other locks because this is the only
* thread that removes items from the need_discard tree
*/
- bch2_trans_unlock(trans);
+ bch2_trans_unlock_long(trans);
blkdev_issue_discard(ca->disk_sb.bdev,
k.k->p.offset * ca->mi.bucket_size,
ca->mi.bucket_size,