diff options
author | J. Bruce Fields <bfields@redhat.com> | 2020-06-03 17:12:32 +0200 |
---|---|---|
committer | J. Bruce Fields <bfields@redhat.com> | 2020-06-03 17:12:32 +0200 |
commit | c25bf185e57213b54ea0d632ac04907310993433 (patch) | |
tree | 4086c70f23f26bcd29f07ab3d3600a8e230139ca /fs | |
parent | nfsd4: make drc_slab global, not per-net (diff) | |
download | linux-c25bf185e57213b54ea0d632ac04907310993433.tar.xz linux-c25bf185e57213b54ea0d632ac04907310993433.zip |
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: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/nfsd/nfscache.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/nfsd/nfscache.c b/fs/nfsd/nfscache.c index f30a7def7899..0a0cf1fd77d3 100644 --- a/fs/nfsd/nfscache.c +++ b/fs/nfsd/nfscache.c @@ -477,8 +477,7 @@ found_entry: rtn = RC_REPLY; break; default: - printk(KERN_WARNING "nfsd: bad repcache type %d\n", rp->c_type); - nfsd_reply_cache_free_locked(b, rp, nn); + WARN_ONCE(1, "nfsd: bad repcache type %d\n", rp->c_type); } out_trace: |