Commit 416769ea authored by Linus Torvalds's avatar Linus Torvalds

Use cond_sched() instead of manual expansion of it.

parent 6cbb2ab5
...@@ -398,10 +398,7 @@ static inline int do_follow_link(struct dentry *dentry, struct nameidata *nd) ...@@ -398,10 +398,7 @@ static inline int do_follow_link(struct dentry *dentry, struct nameidata *nd)
goto loop; goto loop;
if (current->total_link_count >= 40) if (current->total_link_count >= 40)
goto loop; goto loop;
if (need_resched()) { cond_resched();
current->state = TASK_RUNNING;
schedule();
}
err = security_inode_follow_link(dentry, nd); err = security_inode_follow_link(dentry, nd);
if (err) if (err)
goto loop; goto loop;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment