[GIT PULL] filesystem-dax fix for 4.19-rc6
From: Williams, Dan J
Date: Sat Sep 29 2018 - 22:26:15 EST
Hi Greg, please pull from...
git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm tags/libnvdimm-fixes2-4.19-rc6
...to receive one more urgent fix for 4.19-rc6.
---
The following changes since commit 6bf4ca7fbc85d80446ac01c0d1d77db4d91a6d84:
Linux 4.19-rc5 (2018-09-23 19:15:18 +-0200)
are available in the Git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm tags/libnvdimm-fixes2-4.19-rc6
for you to fetch changes up to f52afc93cd018fe6910133a05d44671192d1aeb0:
dax: Fix deadlock in dax+AF8-lock+AF8-mapping+AF8-entry() (2018-09-27 10:56:15 -0700)
----------------------------------------------------------------
filesystem-dax for 4.19-rc6
Fix a deadlock in the new for 4.19 dax+AF8-lock+AF8-mapping+AF8-entry() routine.
----------------------------------------------------------------
Jan Kara (1):
dax: Fix deadlock in dax+AF8-lock+AF8-mapping+AF8-entry()
fs/dax.c +AHw- 1 +-
1 file changed, 1 insertion(+-)
commit f52afc93cd018fe6910133a05d44671192d1aeb0
Author: Jan Kara +ADw-jack+AEA-suse.cz+AD4-
Date: Thu Sep 27 13:23:32 2018 +-0200
dax: Fix deadlock in dax+AF8-lock+AF8-mapping+AF8-entry()
When dax+AF8-lock+AF8-mapping+AF8-entry() has to sleep to obtain entry lock, it will
fail to unlock mapping-+AD4-i+AF8-pages spinlock and thus immediately deadlock
against itself when retrying to grab the entry lock again. Fix the
problem by unlocking mapping-+AD4-i+AF8-pages before retrying.
Fixes: c2a7d2a11552 (+ACI-filesystem-dax: Introduce dax+AF8-lock+AF8-mapping+AF8-entry()+ACI-)
Reported-by: Barret Rhoden +ADw-brho+AEA-google.com+AD4-
Signed-off-by: Jan Kara +ADw-jack+AEA-suse.cz+AD4-
Signed-off-by: Dan Williams +ADw-dan.j.williams+AEA-intel.com+AD4-
diff --git a/fs/dax.c b/fs/dax.c
index f32d7125ad0f..e4ef8af31aa6 100644
--- a/fs/dax.c
+-+-+- b/fs/dax.c
+AEAAQA- -447,6 +-447,7 +AEAAQA- bool dax+AF8-lock+AF8-mapping+AF8-entry(struct page +ACo-page)
xa+AF8-unlock+AF8-irq(+ACY-mapping-+AD4-i+AF8-pages)+ADs-
break+ADs-
+AH0- else if (IS+AF8-ERR(entry)) +AHs-
+- xa+AF8-unlock+AF8-irq(+ACY-mapping-+AD4-i+AF8-pages)+ADs-
WARN+AF8-ON+AF8-ONCE(PTR+AF8-ERR(entry) +ACEAPQ- -EAGAIN)+ADs-
continue+ADs-
+AH0-