[PATCH 5.10 651/770] NFSD: Refactor common code out of dirlist helpers