<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/fs/smb/client/dir.c, branch linux-rolling-lts</title>
<subtitle>Hosts the 0x221E linux distro kernel.</subtitle>
<id>https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-rolling-lts</id>
<link rel='self' href='https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-rolling-lts'/>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/'/>
<updated>2026-03-19T15:08:45Z</updated>
<entry>
<title>smb: client: fix atomic open with O_DIRECT &amp; O_SYNC</title>
<updated>2026-03-19T15:08:45Z</updated>
<author>
<name>Paulo Alcantara</name>
<email>pc@manguebit.org</email>
</author>
<published>2026-03-07T21:20:16Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=9509b659ca7ebe52752b5c3d805c24f9df8fa570'/>
<id>urn:sha1:9509b659ca7ebe52752b5c3d805c24f9df8fa570</id>
<content type='text'>
commit 4a7d2729dc99437dbb880a64c47828c0d191b308 upstream.

When user application requests O_DIRECT|O_SYNC along with O_CREAT on
open(2), CREATE_NO_BUFFER and CREATE_WRITE_THROUGH bits were missed in
CREATE request when performing an atomic open, thus leading to
potentially data integrity issues.

Fix this by setting those missing bits in CREATE request when
O_DIRECT|O_SYNC has been specified in cifs_do_create().

Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Signed-off-by: Paulo Alcantara (Red Hat) &lt;pc@manguebit.org&gt;
Reviewed-by: David Howells &lt;dhowells@redhat.com&gt;
Acked-by: Henrique Carvalho &lt;henrique.carvalho@suse.com&gt;
Cc: Tom Talpey &lt;tom@talpey.com&gt;
Cc: linux-cifs@vger.kernel.org
Cc: stable@vger.kernel.org
Signed-off-by: Steve French &lt;stfrench@microsoft.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>smb: client: Use common code in cifs_do_create()</title>
<updated>2025-10-07T18:31:27Z</updated>
<author>
<name>Markus Elfring</name>
<email>elfring@users.sourceforge.net</email>
</author>
<published>2025-10-05T18:36:33Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=ce47f7498598f4cf8729a6b93722c98814385e78'/>
<id>urn:sha1:ce47f7498598f4cf8729a6b93722c98814385e78</id>
<content type='text'>
Use a label once more so that a bit of common code can be better reused
at the end of this function implementation.

Signed-off-by: Markus Elfring &lt;elfring@users.sourceforge.net&gt;
Acked-by: Enzo Matsumiya &lt;ematsumiya@suse.de&gt;
Reviewed-by: David Howells &lt;dhowells@redhat.com&gt;
Signed-off-by: Steve French &lt;stfrench@microsoft.com&gt;
</content>
</entry>
<entry>
<title>smb: client: Use common code in cifs_lookup()</title>
<updated>2025-10-06T21:43:44Z</updated>
<author>
<name>Markus Elfring</name>
<email>elfring@users.sourceforge.net</email>
</author>
<published>2025-10-06T21:39:35Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=61da08ecb55264fa1e2c7b8c8a630bed716edbdb'/>
<id>urn:sha1:61da08ecb55264fa1e2c7b8c8a630bed716edbdb</id>
<content type='text'>
Use three additional labels so that another bit of common code can be
better reused at the end of this function implementation.

Signed-off-by: Markus Elfring &lt;elfring@users.sourceforge.net&gt;
Signed-off-by: Steve French &lt;stfrench@microsoft.com&gt;
</content>
</entry>
<entry>
<title>smb: client: Reduce the scopes for a few variables in two functions</title>
<updated>2025-10-06T21:43:39Z</updated>
<author>
<name>Markus Elfring</name>
<email>elfring@users.sourceforge.net</email>
</author>
<published>2025-10-05T17:01:48Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=e7933f5b019c1daef0a138661d6e504f0259de98'/>
<id>urn:sha1:e7933f5b019c1daef0a138661d6e504f0259de98</id>
<content type='text'>
* cifs_lookup():
  Move the definition for the local variable “cfid” into an else branch
  so that the corresponding setting will only be performed if a NULL inode
  was detected during lookup by this function.

* cifs_d_revalidate():
  Move the definition for the local variables “inode” and “rc” into
  an if branch so that the corresponding setting will only be performed
  after a d_really_is_positive() call.

  Move the definition for the local variable “cfid” into an else branch
  so that the corresponding setting will only be performed if further data
  processing will be needed for an open_cached_dir_by_dentry() call.

Signed-off-by: Markus Elfring &lt;elfring@users.sourceforge.net&gt;
Acked-by: Henrique Carvalho &lt;henrique.carvalho@suse.com&gt;
Signed-off-by: Steve French &lt;stfrench@microsoft.com&gt;
</content>
</entry>
<entry>
<title>Merge tag '6.18-rc-part1-smb3-client-fixes' of git://git.samba.org/sfrench/cifs-2.6</title>
<updated>2025-10-03T21:13:23Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2025-10-03T21:13:23Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=63e62baaa72e1aceb422f64a50408bc9b02a6022'/>
<id>urn:sha1:63e62baaa72e1aceb422f64a50408bc9b02a6022</id>
<content type='text'>
Pull smb client updates from Steve French:

 - Fix oops in crypt message

 - Remove duplicate arc4 code

 - Fix potential io_uring reconnect

 - Two important directory leases fixes and three perf improvements

 - Three minor cleanups

 - Four debug improvements (e.g. for showing more information on leases,
   and one for adding more helpful information on reconnect)

* tag '6.18-rc-part1-smb3-client-fixes' of git://git.samba.org/sfrench/cifs-2.6:
  cifs: client: force multichannel=off when max_channels=1
  smb client: fix bug with newly created file in cached dir
  smb: client: short-circuit negative lookups when parent dir is fully cached
  smb: client: short-circuit in open_cached_dir_by_dentry() if !dentry
  smb: client: remove pointless cfid-&gt;has_lease check
  smb: client: transport: minor indentation style fix
  smb: client: transport: avoid reconnects triggered by pending task work
  smb: client: remove unused fid_lock
  smb: client: update cfid-&gt;last_access_time in open_cached_dir_by_dentry()
  smb: client: ensure open_cached_dir_by_dentry() only returns valid cfid
  smb: client: account smb directory cache usage and per-tcon totals
  smb: client: add drop_dir_cache module parameter to invalidate cached dirents
  smb: client: show lease state as R/H/W (or NONE) in open_files
  smb: client: fix crypto buffers in non-linear memory
  smb: Use arc4 library instead of duplicate arc4 code
  smb: client: add tcon information to smb2_reconnect() debug messages
</content>
</entry>
<entry>
<title>smb client: fix bug with newly created file in cached dir</title>
<updated>2025-10-02T03:42:15Z</updated>
<author>
<name>Bharath SM</name>
<email>bharathsm@microsoft.com</email>
</author>
<published>2025-09-26T15:13:50Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=aa12118dbcfe659697567c9daa0eac2c71e3fd37'/>
<id>urn:sha1:aa12118dbcfe659697567c9daa0eac2c71e3fd37</id>
<content type='text'>
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 &lt;bharathsm@microsoft.com&gt;
Signed-off-by: Steve French &lt;stfrench@microsoft.com&gt;
</content>
</entry>
<entry>
<title>smb: client: short-circuit negative lookups when parent dir is fully cached</title>
<updated>2025-10-02T03:42:15Z</updated>
<author>
<name>Henrique Carvalho</name>
<email>henrique.carvalho@suse.com</email>
</author>
<published>2025-09-09T01:04:23Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=316025335a2d41dc71c47abf6eb9a41987e94c0a'/>
<id>urn:sha1:316025335a2d41dc71c47abf6eb9a41987e94c0a</id>
<content type='text'>
When the parent directory has a valid and complete cached enumeration we
can assume that negative dentries are not present in the directory, thus
we can return without issuing a request.

This reduces traffic for common ENOENT when the directory entries are
cached.

Signed-off-by: Henrique Carvalho &lt;henrique.carvalho@suse.com&gt;
Signed-off-by: Steve French &lt;stfrench@microsoft.com&gt;
</content>
</entry>
<entry>
<title>smb: client: ensure open_cached_dir_by_dentry() only returns valid cfid</title>
<updated>2025-10-02T02:49:59Z</updated>
<author>
<name>Steve French</name>
<email>stfrench@microsoft.com</email>
</author>
<published>2025-10-02T02:49:59Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=a365f2c049b3846640234bc25e4f8c46abea6c98'/>
<id>urn:sha1:a365f2c049b3846640234bc25e4f8c46abea6c98</id>
<content type='text'>
open_cached_dir_by_dentry() was exposing an invalid cached directory to
callers. The validity check outside the function was exclusively based
on cfid-&gt;time.

Add validity check before returning success and introduce
is_valid_cached_dir() helper for consistent checks across the code.

Signed-off-by: Henrique Carvalho &lt;henrique.carvalho@suse.com&gt;
Reviwed-by: Enzo Matsumiya &lt;ematsumiya@suse.de&gt;
Signed-off-by: Steve French &lt;stfrench@microsoft.com&gt;
</content>
</entry>
<entry>
<title>simplify cifs_atomic_open()</title>
<updated>2025-09-17T03:59:38Z</updated>
<author>
<name>Al Viro</name>
<email>viro@zeniv.linux.org.uk</email>
</author>
<published>2025-09-12T15:37:21Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=fe871217ac64a6a26607f74f7f59ab9fa56fd41c'/>
<id>urn:sha1:fe871217ac64a6a26607f74f7f59ab9fa56fd41c</id>
<content type='text'>
now that finish_no_open() does the right thing if it's given ERR_PTR() as
dentry...

Reviewed-by: NeilBrown &lt;neil@brown.name&gt;
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>smb: invalidate and close cached directory when creating child entries</title>
<updated>2025-07-13T22:16:29Z</updated>
<author>
<name>Bharath SM</name>
<email>bharathsm@microsoft.com</email>
</author>
<published>2025-06-30T18:53:03Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=83898e4a858387c88cd7456f713cb8fd49440cf9'/>
<id>urn:sha1:83898e4a858387c88cd7456f713cb8fd49440cf9</id>
<content type='text'>
When a parent lease key is passed to the server during a create operation
while holding a directory lease, the server may not send a lease break to
the client. In such cases, it becomes the client’s responsibility to
ensure cache consistency.

This led to a problem where directory listings (e.g., `ls` or `readdir`)
could return stale results after a new file is created.
eg:
ls /mnt/share/
touch /mnt/share/file1
ls /mnt/share/

In this scenario, the final `ls` may not show  `file1` due to the stale
directory cache.

For now, fix this by marking the cached directory as invalid if using
the parent lease key during create, and explicitly closing the cached
directory after successful file creation.

Fixes: 037e1bae588eacf ("smb: client: use ParentLeaseKey in cifs_do_create")

Signed-off-by: Bharath SM &lt;bharathsm@microsoft.com&gt;
Signed-off-by: Steve French &lt;stfrench@microsoft.com&gt;
</content>
</entry>
</feed>
