aboutsummaryrefslogtreecommitdiffstats
path: root/fs/smb/client/smb2ops.c
diff options
context:
space:
mode:
authorHenrique Carvalho <henrique.carvalho@suse.com>2025-09-18 22:44:34 -0300
committerSteve French <stfrench@microsoft.com>2025-10-01 22:42:04 -0500
commit2f6a4af028dbb392d55b261cafcb922dd7b7ffea (patch)
tree6b800acb5118f246a76bb40fefc4d0ebf0b40537 /fs/smb/client/smb2ops.c
parentsmb: client: transport: minor indentation style fix (diff)
downloadlinux-2f6a4af028dbb392d55b261cafcb922dd7b7ffea.tar.gz
linux-2f6a4af028dbb392d55b261cafcb922dd7b7ffea.zip
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: Henrique Carvalho <henrique.carvalho@suse.com> Reviewed-by: Enzo Matsumiya <ematsumiya@suse.de> Signed-off-by: Steve French <stfrench@microsoft.com>
Diffstat (limited to '')
-rw-r--r--fs/smb/client/smb2ops.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/fs/smb/client/smb2ops.c b/fs/smb/client/smb2ops.c
index 12792ddc6b0c..058050f744c0 100644
--- a/fs/smb/client/smb2ops.c
+++ b/fs/smb/client/smb2ops.c
@@ -954,11 +954,8 @@ 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);
+ return 0;
}
utf16_path = cifs_convert_path_to_utf16(full_path, cifs_sb);