From 33e8e9be6b7c4055fd4732d96a344332c3347e43 Mon Sep 17 00:00:00 2001 From: Matthew Dillon Date: Fri, 27 Apr 2018 20:55:34 -0700 Subject: [PATCH] hammer - Add missing lock * Add missing lock around hammer_redo_fifo_end_flush(). The missing lock could result in an assertion under heavy loads. --- sys/vfs/hammer/hammer_redo.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/vfs/hammer/hammer_redo.c b/sys/vfs/hammer/hammer_redo.c index 3b38db7500..fc5a4dc744 100644 --- a/sys/vfs/hammer/hammer_redo.c +++ b/sys/vfs/hammer/hammer_redo.c @@ -354,6 +354,7 @@ hammer_redo_fifo_end_flush(hammer_inode_t ip) { hammer_mount_t hmp = ip->hmp; + hammer_lock_ex(&hmp->undo_lock); if (ip->flags & HAMMER_INODE_RDIRTY) { RB_REMOVE(hammer_redo_rb_tree, &hmp->rb_redo_root, ip); ip->flags &= ~HAMMER_INODE_RDIRTY; @@ -367,4 +368,5 @@ hammer_redo_fifo_end_flush(hammer_inode_t ip) } ip->flags |= HAMMER_INODE_RDIRTY; } + hammer_unlock(&hmp->undo_lock); } -- 2.11.4.GIT