From 416769ea0204afd8d7fbcc5f43d42fb56cf855c3 Mon Sep 17 00:00:00 2001 From: Linus Torvalds Date: Mon, 10 Mar 2003 07:39:34 -0800 Subject: [PATCH] Use cond_sched() instead of manual expansion of it. --- fs/namei.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/fs/namei.c b/fs/namei.c index 24bf596c55b15..d9c1748ff7aaa 100644 --- a/fs/namei.c +++ b/fs/namei.c @@ -398,10 +398,7 @@ static inline int do_follow_link(struct dentry *dentry, struct nameidata *nd) goto loop; if (current->total_link_count >= 40) goto loop; - if (need_resched()) { - current->state = TASK_RUNNING; - schedule(); - } + cond_resched(); err = security_inode_follow_link(dentry, nd); if (err) goto loop; -- 2.53.0