From b10a51be25c2df37579ac5d39a4e9be47773b42c Mon Sep 17 00:00:00 2001 From: Bharath SM Date: Fri, 26 Sep 2025 10:13:50 -0500 Subject: [PATCH 16/16] smb client: fix bug with newly created file in cached dir 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 Signed-off-by: Steve French --- fs/smb/client/dir.c | 1 + 1 file changed, 1 insertion(+) diff --git a/fs/smb/client/dir.c b/fs/smb/client/dir.c index bc145436eba4..a233a5fe377b 100644 --- a/fs/smb/client/dir.c +++ b/fs/smb/client/dir.c @@ -329,6 +329,7 @@ static int cifs_do_create(struct inode *inode, struct dentry *direntry, unsigned parent_cfid->fid.lease_key, SMB2_LEASE_KEY_SIZE); parent_cfid->dirents.is_valid = false; + parent_cfid->dirents.is_failed = true; } break; } -- 2.48.1