diff options
author | Matthew Wilcox <willy@infradead.org> | 2018-11-09 20:09:37 -0500 |
---|---|---|
committer | Matthew Wilcox <willy@infradead.org> | 2018-11-16 16:38:50 -0500 |
commit | 7ae2ea7dc45e8250a74cfaaecdce578427669ae5 (patch) | |
tree | 838dbe7e08ee992a51e5a38236f3df0cf6260c18 | |
parent | 6d7cd8c1373746a93dc868ee9d38a82df78b38aa (diff) | |
download | linux-7ae2ea7dc45e8250a74cfaaecdce578427669ae5.tar.gz linux-7ae2ea7dc45e8250a74cfaaecdce578427669ae5.tar.bz2 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); |