summaryrefslogtreecommitdiff
path: root/fs/dcache.c
diff options
context:
space:
mode:
authorAlex Shi <alex.shi@linaro.org>2016-08-18 12:33:31 +0800
committerAlex Shi <alex.shi@linaro.org>2016-08-18 12:33:31 +0800
commitfdd85431d91c9da37e9e696eb8fe80f1a2dcdbeb (patch)
treeac60b28ebed345df274ce42aa3c9f3ee091875d1 /fs/dcache.c
parente01035c1a71d7cceebc3df92f79577df7438523a (diff)
parente779279da78339ec75fa72571ef901a447762cc6 (diff)
Merge branch 'linux-linaro-lsk-v4.4' into linux-linaro-lsk-v4.4-android
Diffstat (limited to 'fs/dcache.c')
-rw-r--r--fs/dcache.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/fs/dcache.c b/fs/dcache.c
index d04920036269..9e5099997fcd 100644
--- a/fs/dcache.c
+++ b/fs/dcache.c
@@ -578,7 +578,6 @@ static struct dentry *dentry_kill(struct dentry *dentry)
failed:
spin_unlock(&dentry->d_lock);
- cpu_relax();
return dentry; /* try again with same dentry */
}
@@ -752,6 +751,8 @@ void dput(struct dentry *dentry)
return;
repeat:
+ might_sleep();
+
rcu_read_lock();
if (likely(fast_dput(dentry))) {
rcu_read_unlock();
@@ -783,8 +784,10 @@ repeat:
kill_it:
dentry = dentry_kill(dentry);
- if (dentry)
+ if (dentry) {
+ cond_resched();
goto repeat;
+ }
}
EXPORT_SYMBOL(dput);