From: Jeff Layton Date: Mon, 25 Mar 2013 11:59:57 +0000 (-0400) Subject: nfs: allow the v4.1 callback thread to freeze X-Git-Tag: next-20130422~99^2~25 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=25d280aad82e559cc7bc762410cd35ea5b98e294;p=karo-tx-linux.git nfs: allow the v4.1 callback thread to freeze The v4.1 callback thread has set_freezable() at the top, but it doesn't ever try to freeze within the loop. Have it call try_to_freeze() at the top of the loop. If a freeze event occurs, recheck kthread_should_stop() after thawing. Reported-by: Yanchuan Nian Signed-off-by: Jeff Layton Signed-off-by: Trond Myklebust --- diff --git a/fs/nfs/callback.c b/fs/nfs/callback.c index 5088b57b078a..cff089a412c7 100644 --- a/fs/nfs/callback.c +++ b/fs/nfs/callback.c @@ -125,6 +125,9 @@ nfs41_callback_svc(void *vrqstp) set_freezable(); while (!kthread_should_stop()) { + if (try_to_freeze()) + continue; + prepare_to_wait(&serv->sv_cb_waitq, &wq, TASK_INTERRUPTIBLE); spin_lock_bh(&serv->sv_cb_lock); if (!list_empty(&serv->sv_cb_list)) {