diff options
author | J. Bruce Fields <bfields@redhat.com> | 2012-08-18 03:47:53 +0200 |
---|---|---|
committer | J. Bruce Fields <bfields@redhat.com> | 2012-08-21 23:42:00 +0200 |
commit | 5b444cc9a4c979aa0fa185c8ddca221462a34b7a (patch) | |
tree | 7a2b23292f279c31bacdabd95a709605e194137a /fs/nfs | |
parent | svcrpc: make xpo_recvfrom return only >=0 (diff) | |
download | linux-5b444cc9a4c979aa0fa185c8ddca221462a34b7a.tar.xz linux-5b444cc9a4c979aa0fa185c8ddca221462a34b7a.zip |
svcrpc: remove handling of unknown errors from svc_recv
svc_recv() returns only -EINTR or -EAGAIN. If we really want to worry
about the case where it has a bug that causes it to return something
else, we could stick a WARN() in svc_recv. But it's silly to require
every caller to have all this boilerplate to handle that case.
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'fs/nfs')
-rw-r--r-- | fs/nfs/callback.c | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/fs/nfs/callback.c b/fs/nfs/callback.c index 4c8459e5bdee..d9e2a1880783 100644 --- a/fs/nfs/callback.c +++ b/fs/nfs/callback.c @@ -45,7 +45,7 @@ unsigned short nfs_callback_tcpport6; static int nfs4_callback_svc(void *vrqstp) { - int err, preverr = 0; + int err; struct svc_rqst *rqstp = vrqstp; set_freezable(); @@ -55,20 +55,8 @@ nfs4_callback_svc(void *vrqstp) * Listen for a request on the socket */ err = svc_recv(rqstp, MAX_SCHEDULE_TIMEOUT); - if (err == -EAGAIN || err == -EINTR) { - preverr = err; + if (err == -EAGAIN || err == -EINTR) continue; - } - if (err < 0) { - if (err != preverr) { - printk(KERN_WARNING "NFS: %s: unexpected error " - "from svc_recv (%d)\n", __func__, err); - preverr = err; - } - schedule_timeout_uninterruptible(HZ); - continue; - } - preverr = err; svc_process(rqstp); } return 0; |