cifs: reduce number of referral requests in DFS link lookups
authorPaulo Alcantara <pc@cjr.nz>
Tue, 21 Jul 2020 12:36:39 +0000 (09:36 -0300)
committerSteve French <stfrench@microsoft.com>
Sun, 2 Aug 2020 23:00:26 +0000 (18:00 -0500)
commit2e5de42445217c7c1310af8f4b3fe6f66bd865b1
treec28c20794e0d9840bd004ec1f43fd318a5c9b84c
parent565674d613d7f45d87284ba9f0be730ce4b335d0
cifs: reduce number of referral requests in DFS link lookups

When looking up the DFS cache with a referral path that has more than
two path components, and is a complete prefix of an existing cache
entry, do not request another referral and just return the matched
entry as specified in MS-DFSC 3.2.5.5 Receiving a Root Referral
Request or Link Referral Request.

Signed-off-by: Paulo Alcantara (SUSE) <pc@cjr.nz>
Reviewed-by: Aurelien Aptel <aaptel@suse.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/cifs/dfs_cache.c