diff options
author | Jeff Layton <jlayton@redhat.com> | 2013-03-25 12:59:57 +0100 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2013-04-05 23:03:52 +0200 |
commit | 25d280aad82e559cc7bc762410cd35ea5b98e294 (patch) | |
tree | 07c6185345f59b818e51684104aa2ed99cd15931 /fs/nfs/callback.c | |
parent | NFSv4: Fix Oopses in the fs_locations code (diff) | |
download | linux-25d280aad82e559cc7bc762410cd35ea5b98e294.tar.xz linux-25d280aad82e559cc7bc762410cd35ea5b98e294.zip |
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 <ycnian@gmail.com>
Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/callback.c')
-rw-r--r-- | fs/nfs/callback.c | 3 |
1 files changed, 3 insertions, 0 deletions
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)) { |