Commit 2f6a4af0 authored by Henrique Carvalho's avatar Henrique Carvalho Committed by Steve French
Browse files

smb: client: remove pointless cfid->has_lease check



open_cached_dir() will only return a valid cfid, which has both
has_lease = true and time != 0.

Remove the pointless check of cfid->has_lease right after
open_cached_dir() returns no error.

Signed-off-by: default avatarHenrique Carvalho <henrique.carvalho@suse.com>
Reviewed-by: default avatarEnzo Matsumiya <ematsumiya@suse.de>
Signed-off-by: default avatarSteve French <stfrench@microsoft.com>
parent 6c7fd184
Loading
Loading
Loading
Loading
+1 −4
Original line number Diff line number Diff line
@@ -954,12 +954,9 @@ smb2_is_path_accessible(const unsigned int xid, struct cifs_tcon *tcon,

	rc = open_cached_dir(xid, tcon, full_path, cifs_sb, true, &cfid);
	if (!rc) {
		if (cfid->has_lease) {
		close_cached_dir(cfid);
		return 0;
	}
		close_cached_dir(cfid);
	}

	utf16_path = cifs_convert_path_to_utf16(full_path, cifs_sb);
	if (!utf16_path)