diff options
author | Matthew Wilcox <willy@infradead.org> | 2018-11-10 02:09:37 +0100 |
---|---|---|
committer | Matthew Wilcox <willy@infradead.org> | 2018-11-16 22:38:50 +0100 |
commit | 7ae2ea7dc45e8250a74cfaaecdce578427669ae5 (patch) | |
tree | 838dbe7e08ee992a51e5a38236f3df0cf6260c18 | |
parent | dax: Remove optimisation from dax_lock_mapping_entry (diff) | |
download | linux-7ae2ea7dc45e8250a74cfaaecdce578427669ae5.tar.xz linux-7ae2ea7dc45e8250a74cfaaecdce578427669ae5.zip |
dax: Make sure the unlocking entry isn't locked
I wrote the semantics in the commit message, but didn't document it in
the source code. Use a BUG_ON instead (if any code does do this, it's
really buggy; we can't recover and it's worth taking the machine down).
Signed-off-by: Matthew Wilcox <willy@infradead.org>
-rw-r--r-- | fs/dax.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -255,6 +255,7 @@ static void dax_unlock_entry(struct xa_state *xas, void *entry) { void *old; + BUG_ON(dax_is_locked(entry)); xas_reset(xas); xas_lock_irq(xas); old = xas_store(xas, entry); |