projects
/
linux-block.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a5b696e
)
bcachefs: fiemap: Fix a lockdep splat
author
Kent Overstreet
<kent.overstreet@linux.dev>
Tue, 20 Jun 2023 01:12:05 +0000
(21:12 -0400)
committer
Kent Overstreet
<kent.overstreet@linux.dev>
Sun, 22 Oct 2023 21:10:04 +0000
(17:10 -0400)
As with the previous patch, we generally can't hold btree locks while
copying to userspace, as that may incur a page fault and require
mmap_lock.
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
fs/bcachefs/fs.c
patch
|
blob
|
blame
|
history
diff --git
a/fs/bcachefs/fs.c
b/fs/bcachefs/fs.c
index f417889eba08b38884bc2f7c0b97bce094bd0a35..9280f514bc9f52e3ec873c5231eab6bcc33146a8 100644
(file)
--- a/
fs/bcachefs/fs.c
+++ b/
fs/bcachefs/fs.c
@@
-943,6
+943,7
@@
retry:
cur.k->k.p.offset += cur.k->k.size;
if (have_extent) {
+ bch2_trans_unlock(&trans);
ret = bch2_fill_extent(c, info,
bkey_i_to_s_c(prev.k), 0);
if (ret)
@@
-961,9
+962,11
@@
err:
if (bch2_err_matches(ret, BCH_ERR_transaction_restart))
goto retry;
- if (!ret && have_extent)
+ if (!ret && have_extent) {
+ bch2_trans_unlock(&trans);
ret = bch2_fill_extent(c, info, bkey_i_to_s_c(prev.k),
FIEMAP_EXTENT_LAST);
+ }
bch2_trans_exit(&trans);
bch2_bkey_buf_exit(&cur, c);