cifs: Grab a reference for the dentry of the cached directory during the lifetime...
authorRonnie Sahlberg <lsahlber@redhat.com>
Mon, 8 Mar 2021 23:07:31 +0000 (09:07 +1000)
committerSteve French <stfrench@microsoft.com>
Sun, 25 Apr 2021 21:28:23 +0000 (16:28 -0500)
commit5e9c89d43fa6f5d458d4d0f9e22a67cc001c8da9
treee0882caf0f8bf52942dcfcbf9e671d41d82d97c6
parent269f67e1ffead61777b1b0cf2ea0f61d06f8c56d
cifs: Grab a reference for the dentry of the cached directory during the lifetime of the cache

We need to hold both a reference for the root/superblock as well as the directory that we
are caching. We need to drop these references before we call kill_anon_sb().

At this point, the root and the cached dentries are always the same but this will change
once we start caching other directories as well.

Signed-off-by: Ronnie Sahlberg <lsahlber@redhat.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/cifs/cifsfs.c
fs/cifs/cifsglob.h
fs/cifs/smb2ops.c