]> Git Repo - linux.git/commitdiff
nfsd: safer handling of corrupted c_type
authorJ. Bruce Fields <[email protected]>
Wed, 3 Jun 2020 15:12:32 +0000 (11:12 -0400)
committerJ. Bruce Fields <[email protected]>
Wed, 3 Jun 2020 15:12:32 +0000 (11:12 -0400)
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 <[email protected]>
fs/nfsd/nfscache.c

index f30a7def78996721aa426447d279c07c2e7169d7..0a0cf1fd77d33d82534a7b8996cc8f1cf9e0fdb8 100644 (file)
@@ -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:
This page took 0.062389 seconds and 4 git commands to generate.