summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorHugh Dickins <hugh@veritas.com>2002-10-02 22:58:55 -0700
committerLinus Torvalds <torvalds@home.transmeta.com>2002-10-02 22:58:55 -0700
commita2495207a528e2ec61f6c07acbfa7d4fb7cac8f0 (patch)
treece03a29aa6bbee185f425b98ac0ea0071322cffe /include/linux
parentc21c3ad03cb567ed1e1d1ba93aa01983c86078d6 (diff)
[PATCH] tmpfs swapoff deadlock
tmpfs 1/5 swapoff deadlock: my igrab/iput around the yield in shmem_unuse_inode was rubbish, seems my testing never really hit the case until last week, when truncation of course deadlocked on the page held locked across the iput (at least I had the foresight to say "ugh!" there). Don't yield here, switch over to the simple backoff I'd been using for months in the loopable tmpfs patch (yes, it could loop indefinitely for memory, that's already an issue to be dealt with later). The return convention from shmem_unuse to try_to_unuse is inelegant (commented at both ends), but effective.
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/swap.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/swap.h b/include/linux/swap.h
index f4acbd1e9b46..4ec8559245c6 100644
--- a/include/linux/swap.h
+++ b/include/linux/swap.h
@@ -218,7 +218,7 @@ extern spinlock_t swaplock;
#define swap_device_lock(p) spin_lock(&p->sdev_lock)
#define swap_device_unlock(p) spin_unlock(&p->sdev_lock)
-extern void shmem_unuse(swp_entry_t entry, struct page *page);
+extern int shmem_unuse(swp_entry_t entry, struct page *page);
#endif /* __KERNEL__*/