]> asedeno.scripts.mit.edu Git - linux.git/commit
svcrpc: free contexts immediately on PROC_DESTROY
authorNeil Brown <neilb@suse.com>
Thu, 22 Dec 2016 17:38:06 +0000 (12:38 -0500)
committerJ. Bruce Fields <bfields@redhat.com>
Tue, 31 Jan 2017 17:31:53 +0000 (12:31 -0500)
commit2b477c00f3bd87c3286f5940cb4174d8b01ee0d5
treec6de85ae00a8251c4e7d5093a2881de61b487003
parent034dd34ff4916ec1f8f74e39ca3efb04eab2f791
svcrpc: free contexts immediately on PROC_DESTROY

We currently handle a client PROC_DESTROY request by turning it
CACHE_NEGATIVE, setting the expired time to now, and then waiting for
cache_clean to clean it up later.  Since we forgot to set the cache's
nextcheck value, that could take up to 30 minutes.  Also, though there's
probably no real bug in this case, setting CACHE_NEGATIVE directly like
this probably isn't a great idea in general.

So let's just remove the entry from the cache directly, and move this
bit of cache manipulation to a helper function.

Signed-off-by: Neil Brown <neilb@suse.com>
Reported-by: Andy Adamson <andros@netapp.com>
Signed-off-by: Andy Adamson <andros@netapp.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
include/linux/sunrpc/cache.h
net/sunrpc/auth_gss/svcauth_gss.c
net/sunrpc/cache.c