]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
smb client: fix bug with newly created file in cached dir
authorBharath SM <bharathsm@microsoft.com>
Fri, 26 Sep 2025 15:13:50 +0000 (10:13 -0500)
committerSteve French <stfrench@microsoft.com>
Thu, 2 Oct 2025 03:42:15 +0000 (22:42 -0500)
Test generic/637 spotted a problem with create of a new file in a
cached directory (by the same client) could cause cases where the
new file does not show up properly in ls on that client until the
lease times out.

Fixes: 037e1bae588e ("smb: client: use ParentLeaseKey in cifs_do_create")
Cc: stable@vger.kernel.org
Signed-off-by: Bharath SM <bharathsm@microsoft.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/smb/client/dir.c

index bc145436eba49a9be1e984e27a3dca5a01ecb128..a233a5fe377b7ed04f6850a3c4b62220e8cf8333 100644 (file)
@@ -329,6 +329,7 @@ retry_open:
                                               parent_cfid->fid.lease_key,
                                               SMB2_LEASE_KEY_SIZE);
                                        parent_cfid->dirents.is_valid = false;
+                                       parent_cfid->dirents.is_failed = true;
                                }
                                break;
                        }