mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 23:32:14 +00:00
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>
This commit is contained in:
parent
6d7cd8c137
commit
7ae2ea7dc4
1 changed files with 1 additions and 0 deletions
1
fs/dax.c
1
fs/dax.c
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue