X-Git-Url: http://git.cascardo.info/?a=blobdiff_plain;f=fs%2Fdcache.c;h=f650a4fc5b7ceda080dfe378d3a6793a7fa00e54;hb=47be61845c77;hp=6d60a764c848298cb546b94abcfd1555efc1b7be;hpb=285b102d3b745f3c2c110c9c327741d87e64aacc;p=cascardo%2Flinux.git diff --git a/fs/dcache.c b/fs/dcache.c index 6d60a764c848..f650a4fc5b7c 100644 --- a/fs/dcache.c +++ b/fs/dcache.c @@ -596,7 +596,6 @@ static struct dentry *dentry_kill(struct dentry *dentry) failed: spin_unlock(&dentry->d_lock); - cpu_relax(); return dentry; /* try again with same dentry */ } @@ -770,6 +769,8 @@ void dput(struct dentry *dentry) return; repeat: + might_sleep(); + rcu_read_lock(); if (likely(fast_dput(dentry))) { rcu_read_unlock(); @@ -803,8 +804,10 @@ repeat: kill_it: dentry = dentry_kill(dentry); - if (dentry) + if (dentry) { + cond_resched(); goto repeat; + } } EXPORT_SYMBOL(dput);