diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2024-01-15 20:37:23 -0500 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2024-01-21 13:27:10 -0500 |
commit | 46bf2e9cc745996ca56e56ed816e60d07811bd9a (patch) | |
tree | 94858ccb5646f0629924d68761471e24b67433df /fs/bcachefs/fs-io-pagecache.h | |
parent | 1a5039041b376f545dfc11d89af77cc720217b44 (diff) | |
download | lwn-46bf2e9cc745996ca56e56ed816e60d07811bd9a.tar.gz lwn-46bf2e9cc745996ca56e56ed816e60d07811bd9a.zip |
bcachefs: Fix excess transaction restarts in __bchfs_fallocate()
drop_locks_do() should not be used in a fastpath without first trying
the do in nonblocking mode - the unlock and relock will cause excessive
transaction restarts and potentially livelocking with other threads that
are contending for the same locks.
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/fs-io-pagecache.h')
-rw-r--r-- | fs/bcachefs/fs-io-pagecache.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/bcachefs/fs-io-pagecache.h b/fs/bcachefs/fs-io-pagecache.h index 27f712ae37a6..8cbaba6565b4 100644 --- a/fs/bcachefs/fs-io-pagecache.h +++ b/fs/bcachefs/fs-io-pagecache.h @@ -143,7 +143,7 @@ int bch2_folio_set(struct bch_fs *, subvol_inum, struct folio **, unsigned); void bch2_bio_page_state_set(struct bio *, struct bkey_s_c); void bch2_mark_pagecache_unallocated(struct bch_inode_info *, u64, u64); -void bch2_mark_pagecache_reserved(struct bch_inode_info *, u64, u64); +int bch2_mark_pagecache_reserved(struct bch_inode_info *, u64 *, u64, bool); int bch2_get_folio_disk_reservation(struct bch_fs *, struct bch_inode_info *, |