summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-09-30 06:19:38 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-09-30 06:19:38 -0700
commit9ba6873e1603988adf97dd5abe18936a2aeff1fd (patch)
treeaed33e2f126698f0b60cc69b08b5067ea3f0ce41
parent291d0e5d81e101392379217b06251fe8c27f1f80 (diff)
parentf52afc93cd018fe6910133a05d44671192d1aeb0 (diff)
downloadlinux-9ba6873e1603988adf97dd5abe18936a2aeff1fd.tar.bz2
Merge tag 'libnvdimm-fixes2-4.19-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm
Dan writes: "filesystem-dax for 4.19-rc6 Fix a deadlock in the new for 4.19 dax_lock_mapping_entry() routine." * tag 'libnvdimm-fixes2-4.19-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm: dax: Fix deadlock in dax_lock_mapping_entry()
-rw-r--r--fs/dax.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/dax.c b/fs/dax.c
index b68ce484e1be..4becbf168b7f 100644
--- a/fs/dax.c
+++ b/fs/dax.c
@@ -447,6 +447,7 @@ bool dax_lock_mapping_entry(struct page *page)
xa_unlock_irq(&mapping->i_pages);
break;
} else if (IS_ERR(entry)) {
+ xa_unlock_irq(&mapping->i_pages);
WARN_ON_ONCE(PTR_ERR(entry) != -EAGAIN);
continue;
}