nfsd: move cache proc (un)registration to separate function