lkml.org 
[lkml]   [2013]   [Nov]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] add cond_resched() to shrink_dcache_for_umount_subtree()

Much like the other shrink_dcache_*() functions,
shrink_dcache_for_umount_subtree() could run for a long time if the dcache
has many entries, so an occasional "cond_resched" is needed to avoid stalls
and soft-lockup warnings.

Unlike the other shrinkers, there is no cond_resched call here. So add one.

Signed-off-by: NeilBrown <neilb@suse.de>

diff --git a/fs/dcache.c b/fs/dcache.c
index ae6ebb88ceff..1811fa19b419 100644
--- a/fs/dcache.c
+++ b/fs/dcache.c
@@ -1154,6 +1154,7 @@ static void shrink_dcache_for_umount_subtree(struct dentry *dentry)

dentry = list_entry(dentry->d_subdirs.next,
struct dentry, d_u.d_child);
+ cond_resched()
}
}
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2013-11-12 07:41    [W:7.660 / U:0.096 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site