Skip to content

Commit 2f6a4af

Browse files
hac-vsmfrench
authored andcommitted
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 <[email protected]> Reviewed-by: Enzo Matsumiya <[email protected]> Signed-off-by: Steve French <[email protected]>
1 parent 6c7fd18 commit 2f6a4af

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

fs/smb/client/smb2ops.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -954,11 +954,8 @@ smb2_is_path_accessible(const unsigned int xid, struct cifs_tcon *tcon,
954954

955955
rc = open_cached_dir(xid, tcon, full_path, cifs_sb, true, &cfid);
956956
if (!rc) {
957-
if (cfid->has_lease) {
958-
close_cached_dir(cfid);
959-
return 0;
960-
}
961957
close_cached_dir(cfid);
958+
return 0;
962959
}
963960

964961
utf16_path = cifs_convert_path_to_utf16(full_path, cifs_sb);

0 commit comments

Comments
 (0)