Skip to content

Commit af3c9b1

Browse files
committed
Squash: fix another kernel panic that arose after the last rebase.
1 parent d10ddf3 commit af3c9b1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

module/zfs/dbuf.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5307,7 +5307,7 @@ dbuf_remap_impl(dnode_t *dn, blkptr_t *bp, krwlock_t *rw, dmu_tx_t *tx)
53075307
* avoid lock contention, only grab it when we are actually
53085308
* changing the BP.
53095309
*/
5310-
if (rw != NULL && !rw_tryupgrade(rw)) {
5310+
if (rw != NULL && !RW_WRITE_HELD(rw) && !rw_tryupgrade(rw)) {
53115311
rw_exit(rw);
53125312
rw_enter(rw, RW_WRITER);
53135313
}

0 commit comments

Comments
 (0)