linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH linux-next] fs: don't call _cond_resched() from the rcu critical section
@ 2015-05-13 16:10 Andrey Vagin
  2015-05-13 16:12 ` Andrey Wagin
  2015-05-13 20:45 ` Al Viro
  0 siblings, 2 replies; 3+ messages in thread
From: Andrey Vagin @ 2015-05-13 16:10 UTC (permalink / raw)
  To: linux-fsdevel; +Cc: Andrey Vagin, NeilBrown

The context can't be switched in rcu critical sections.

Cc: NeilBrown <neilb@suse.de>
Cci: Al Viro <viro@zeniv.linux.org.uk>
Fixes: 26c59f88c223 ("VFS/namei: make the use of touch_atime() in get_link() RCU-safe.")
Signed-off-by: Andrey Vagin <avagin@openvz.org>
---
 fs/namei.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/fs/namei.c b/fs/namei.c
index f884ddd..0ef3c79 100644
--- a/fs/namei.c
+++ b/fs/namei.c
@@ -967,14 +967,13 @@ const char *get_link(struct nameidata *nd)
 
 	if (!(nd->flags & LOOKUP_RCU)) {
 		touch_atime(&last->link);
+		_cond_resched();
 	} else if (atime_needs_update(&last->link, inode)) {
 		if (unlikely(unlazy_walk(nd, NULL, 0)))
 			return ERR_PTR(-ECHILD);
 		touch_atime(&last->link);
 	}
 
-	_cond_resched();
-
 	error = security_inode_follow_link(dentry, inode,
 					   nd->flags & LOOKUP_RCU);
 	if (unlikely(error))
-- 
2.1.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-05-13 20:45 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-13 16:10 [PATCH linux-next] fs: don't call _cond_resched() from the rcu critical section Andrey Vagin
2015-05-13 16:12 ` Andrey Wagin
2015-05-13 20:45 ` Al Viro

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).