Commit 47fc2491 authored by Ronnie Sahlberg's avatar Ronnie Sahlberg Committed by Steve French
Browse files

cifs: improve handlecaching



Only track the dentry for the root handle

Signed-off-by: default avatarRonnie Sahlberg <lsahlber@redhat.com>
Signed-off-by: default avatarSteve French <stfrench@microsoft.com>
parent aea6794e
Loading
Loading
Loading
Loading
+5 −4
Original line number Diff line number Diff line
@@ -47,10 +47,10 @@ int open_cached_dir(unsigned int xid, struct cifs_tcon *tcon,
	if (cifs_sb->root == NULL)
		return -ENOENT;

	if (strlen(path))
		return -ENOENT;

	if (!path[0])
		dentry = cifs_sb->root;
	else
		return -ENOENT;

	cfid = &tcon->cfids->cfid;
	mutex_lock(&cfid->fid_mutex);
@@ -177,6 +177,7 @@ int open_cached_dir(unsigned int xid, struct cifs_tcon *tcon,
	cfid->tcon = tcon;
	cfid->is_valid = true;
	cfid->dentry = dentry;
	if (dentry)
		dget(dentry);
	kref_init(&cfid->refcount);