diff options
Diffstat (limited to 'fs/dcache.c')
-rw-r--r-- | fs/dcache.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/fs/dcache.c b/fs/dcache.c index 660857431b1c..d96330db7f80 100644 --- a/fs/dcache.c +++ b/fs/dcache.c @@ -19,6 +19,7 @@ #include <linux/mm.h> #include <linux/fs.h> #include <linux/fsnotify.h> +#include <linux/delay.h> #include <linux/slab.h> #include <linux/init.h> #include <linux/hash.h> @@ -785,7 +786,11 @@ repeat: kill_it: dentry = dentry_kill(dentry); if (dentry) { - cond_resched(); + int r; + + r = cond_resched(); + if (!r) + cpu_chill(); goto repeat; } } @@ -2391,7 +2396,7 @@ again: if (dentry->d_lockref.count == 1) { if (!spin_trylock(&inode->i_lock)) { spin_unlock(&dentry->d_lock); - cpu_relax(); + cpu_chill(); goto again; } dentry->d_flags &= ~DCACHE_CANT_MOUNT; |