aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs
diff options
context:
space:
mode:
Diffstat (limited to 'fs/nfs')
-rw-r--r--fs/nfs/callback.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/fs/nfs/callback.c b/fs/nfs/callback.c
index a9f153867554..5606ae3d72d3 100644
--- a/fs/nfs/callback.c
+++ b/fs/nfs/callback.c
@@ -59,7 +59,7 @@ module_param_call(callback_tcpport, param_set_port, param_get_int,
59static int 59static int
60nfs_callback_svc(void *vrqstp) 60nfs_callback_svc(void *vrqstp)
61{ 61{
62 int err; 62 int err, preverr = 0;
63 struct svc_rqst *rqstp = vrqstp; 63 struct svc_rqst *rqstp = vrqstp;
64 64
65 set_freezable(); 65 set_freezable();
@@ -74,14 +74,20 @@ nfs_callback_svc(void *vrqstp)
74 * Listen for a request on the socket 74 * Listen for a request on the socket
75 */ 75 */
76 err = svc_recv(rqstp, MAX_SCHEDULE_TIMEOUT); 76 err = svc_recv(rqstp, MAX_SCHEDULE_TIMEOUT);
77 if (err == -EAGAIN || err == -EINTR) 77 if (err == -EAGAIN || err == -EINTR) {
78 preverr = err;
78 continue; 79 continue;
80 }
79 if (err < 0) { 81 if (err < 0) {
80 printk(KERN_WARNING 82 if (err != preverr) {
81 "%s: terminating on error %d\n", 83 printk(KERN_WARNING "%s: unexpected error "
82 __FUNCTION__, -err); 84 "from svc_recv (%d)\n", __func__, err);
83 break; 85 preverr = err;
86 }
87 schedule_timeout_uninterruptible(HZ);
88 continue;
84 } 89 }
90 preverr = err;
85 svc_process(rqstp); 91 svc_process(rqstp);
86 } 92 }
87 unlock_kernel(); 93 unlock_kernel();