From: Henrique Carvalho Date: Fri, 19 Sep 2025 01:44:34 +0000 (-0300) Subject: smb: client: remove pointless cfid->has_lease check X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=2f6a4af028dbb392d55b261cafcb922dd7b7ffea;p=thirdparty%2Fkernel%2Fstable.git 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 Reviewed-by: Enzo Matsumiya Signed-off-by: Steve French --- 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);