Skip to content

Commit 096386a

Browse files
author
Kent Overstreet
committed
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>
1 parent 3e44f32 commit 096386a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fs/bcachefs/alloc_background.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1715,7 +1715,7 @@ static int bch2_discard_one_bucket(struct btree_trans *trans,
17151715
* This works without any other locks because this is the only
17161716
* thread that removes items from the need_discard tree
17171717
*/
1718-
bch2_trans_unlock(trans);
1718+
bch2_trans_unlock_long(trans);
17191719
blkdev_issue_discard(ca->disk_sb.bdev,
17201720
k.k->p.offset * ca->mi.bucket_size,
17211721
ca->mi.bucket_size,

0 commit comments

Comments
 (0)