Commit c25bf185 authored by J. Bruce Fields's avatar J. Bruce Fields

nfsd: safer handling of corrupted c_type

This can only happen if there's a bug somewhere, so let's make it a WARN
not a printk.  Also, I think it's safest to ignore the corruption rather
than trying to fix it by removing a cache entry.
Signed-off-by: default avatarJ. Bruce Fields <bfields@redhat.com>
parent 027690c7
...@@ -477,8 +477,7 @@ int nfsd_cache_lookup(struct svc_rqst *rqstp) ...@@ -477,8 +477,7 @@ int nfsd_cache_lookup(struct svc_rqst *rqstp)
rtn = RC_REPLY; rtn = RC_REPLY;
break; break;
default: default:
printk(KERN_WARNING "nfsd: bad repcache type %d\n", rp->c_type); WARN_ONCE(1, "nfsd: bad repcache type %d\n", rp->c_type);
nfsd_reply_cache_free_locked(b, rp, nn);
} }
out_trace: out_trace:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment