From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrey Vagin Subject: [PATCH linux-next] fs: don't call _cond_resched() from the rcu critical section Date: Wed, 13 May 2015 19:10:01 +0300 Message-ID: <1431533401-28810-1-git-send-email-avagin@openvz.org> Cc: Andrey Vagin , NeilBrown To: linux-fsdevel@vger.kernel.org Return-path: Received: from mailhub.sw.ru ([195.214.232.25]:12550 "EHLO relay.sw.ru" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752850AbbEMQKW (ORCPT ); Wed, 13 May 2015 12:10:22 -0400 Sender: linux-fsdevel-owner@vger.kernel.org List-ID: The context can't be switched in rcu critical sections. Cc: NeilBrown Cci: Al Viro Fixes: 26c59f88c223 ("VFS/namei: make the use of touch_atime() in get_link() RCU-safe.") Signed-off-by: Andrey Vagin --- 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