aboutsummaryrefslogtreecommitdiffstats
path: root/fs/cifs/misc.c
diff options
context:
space:
mode:
authorRonnie Sahlberg <lsahlber@redhat.com>2022-05-10 09:42:07 +1000
committerSteve French <stfrench@microsoft.com>2022-05-24 14:33:11 -0500
commitd87c48ce4d8951f46d21f17ea86bba8853049862 (patch)
tree9d5b70fa32e36691fecab1cf6e45657c78eb92e4 /fs/cifs/misc.c
parentcifs: avoid parallel session setups on same channel (diff)
downloadlinux-dev-d87c48ce4d8951f46d21f17ea86bba8853049862.tar.xz
linux-dev-d87c48ce4d8951f46d21f17ea86bba8853049862.zip
cifs: cache the dirents for entries in a cached directory
This adds caching of the directory entries for a cached directory while we keep a lease on the directory. Reviewed-by: Paulo Alcantara (SUSE) <pc@cjr.nz> Reviewed-by: Enzo Matsumiya <ematsumiya@suse.de> Signed-off-by: Ronnie Sahlberg <lsahlber@redhat.com> Signed-off-by: Steve French <stfrench@microsoft.com>
Diffstat (limited to 'fs/cifs/misc.c')
-rw-r--r--fs/cifs/misc.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/cifs/misc.c b/fs/cifs/misc.c
index e869c2a51034..af5e68a77811 100644
--- a/fs/cifs/misc.c
+++ b/fs/cifs/misc.c
@@ -114,6 +114,8 @@ tconInfoAlloc(void)
kfree(ret_buf);
return NULL;
}
+ INIT_LIST_HEAD(&ret_buf->crfid.dirents.entries);
+ mutex_init(&ret_buf->crfid.dirents.de_mutex);
atomic_inc(&tconInfoAllocCount);
ret_buf->status = TID_NEW;