[PATCH 5.15 438/690] NFSD: Refactor common code out of dirlist helpers