<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/fs/cifs/dir.c, branch linux-5.4.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.4.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.4.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2023-03-17T07:32:50Z</updated>
<entry>
<title>SMB3: Backup intent flag missing from some more ops</title>
<updated>2023-03-17T07:32:50Z</updated>
<author>
<name>Amir Goldstein</name>
</author>
<published>2020-02-03T19:46:43Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a6e44cb21534d2377b8c74a2436d365d38145198'/>
<id>urn:sha1:a6e44cb21534d2377b8c74a2436d365d38145198</id>
<content type='text'>
[ Upstream commit 0f060936e490c6279dfe773d75d526d3d3d77111 ]

When "backup intent" is requested on the mount (e.g. backupuid or
backupgid mount options), the corresponding flag was missing from
some of the operations.

Change all operations to use the macro cifs_create_options() to
set the backup intent flag if needed.

Signed-off-by: Amir Goldstein &lt;amir73il@gmail.com&gt;
Signed-off-by: Steve French &lt;stfrench@microsoft.com&gt;
Stable-dep-of: d447e794a372 ("cifs: Fix uninitialized memory read in smb3_qfs_tcon()")
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>cifs: report error instead of invalid when revalidating a dentry fails</title>
<updated>2021-02-10T08:25:30Z</updated>
<author>
<name>Aurelien Aptel</name>
</author>
<published>2021-02-05T14:42:48Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=00f581964b66386d74285164513dc38ed3b2a5a9'/>
<id>urn:sha1:00f581964b66386d74285164513dc38ed3b2a5a9</id>
<content type='text'>
commit 21b200d091826a83aafc95d847139b2b0582f6d1 upstream.

Assuming
- //HOST/a is mounted on /mnt
- //HOST/b is mounted on /mnt/b

On a slow connection, running 'df' and killing it while it's
processing /mnt/b can make cifs_get_inode_info() returns -ERESTARTSYS.

This triggers the following chain of events:
=&gt; the dentry revalidation fail
=&gt; dentry is put and released
=&gt; superblock associated with the dentry is put
=&gt; /mnt/b is unmounted

This patch makes cifs_d_revalidate() return the error instead of 0
(invalid) when cifs_revalidate_dentry() fails, except for ENOENT (file
deleted) and ESTALE (file recreated).

Signed-off-by: Aurelien Aptel &lt;aaptel@suse.com&gt;
Suggested-by: Shyam Prasad N &lt;nspmangalore@gmail.com&gt;
Reviewed-by: Shyam Prasad N &lt;nspmangalore@gmail.com&gt;
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>cifs_atomic_open(): fix double-put on late allocation failure</title>
<updated>2020-03-18T06:17:51Z</updated>
<author>
<name>Al Viro</name>
</author>
<published>2020-03-12T22:25:20Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=918ba24a9bbf85cbca33d2f3d5369915d3e7fbd3'/>
<id>urn:sha1:918ba24a9bbf85cbca33d2f3d5369915d3e7fbd3</id>
<content type='text'>
commit d9a9f4849fe0c9d560851ab22a85a666cddfdd24 upstream.

several iterations of -&gt;atomic_open() calling conventions ago, we
used to need fput() if -&gt;atomic_open() failed at some point after
successful finish_open().  Now (since 2016) it's not needed -
struct file carries enough state to make fput() work regardless
of the point in struct file lifecycle and discarding it on
failure exits in open() got unified.  Unfortunately, I'd missed
the fact that we had an instance of -&gt;atomic_open() (cifs one)
that used to need that fput(), as well as the stale comment in
finish_open() demanding such late failure handling.  Trivially
fixed...

Fixes: fe9ec8291fca "do_last(): take fput() on error after opening to out:"
Cc: stable@kernel.org # v4.7+
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>CIFS: Force reval dentry if LOOKUP_REVAL flag is set</title>
<updated>2019-10-09T05:10:50Z</updated>
<author>
<name>Pavel Shilovsky</name>
</author>
<published>2019-09-30T17:06:20Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=0b3d0ef9840f7be202393ca9116b857f6f793715'/>
<id>urn:sha1:0b3d0ef9840f7be202393ca9116b857f6f793715</id>
<content type='text'>
Mark inode for force revalidation if LOOKUP_REVAL flag is set.
This tells the client to actually send a QueryInfo request to
the server to obtain the latest metadata in case a directory
or a file were changed remotely. Only do that if the client
doesn't have a lease for the file to avoid unneeded round
trips to the server.

Cc: &lt;stable@vger.kernel.org&gt;
Signed-off-by: Pavel Shilovsky &lt;pshilov@microsoft.com&gt;
Signed-off-by: Steve French &lt;stfrench@microsoft.com&gt;
</content>
</entry>
<entry>
<title>cifs: create a helper to find a writeable handle by path name</title>
<updated>2019-09-16T16:43:37Z</updated>
<author>
<name>Ronnie Sahlberg</name>
</author>
<published>2019-08-29T22:25:46Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=8de9e86c67baa71c661b9ba59a4e23210d98bc79'/>
<id>urn:sha1:8de9e86c67baa71c661b9ba59a4e23210d98bc79</id>
<content type='text'>
rename() takes a path for old_file and in SMB2 we used to just create
a compound for create(old_path)/rename/close().
If we already have a writable handle we can avoid the create() and close()
altogether and just use the existing handle.

For this situation, as we avoid doing the create()
we also avoid triggering an oplock break for the existing handle.

Signed-off-by: Ronnie Sahlberg &lt;lsahlber@redhat.com&gt;
Signed-off-by: Steve French &lt;stfrench@microsoft.com&gt;
</content>
</entry>
<entry>
<title>cifs: replace various strncpy with strscpy and similar</title>
<updated>2019-08-27T22:25:12Z</updated>
<author>
<name>Ronnie Sahlberg</name>
</author>
<published>2019-08-26T23:30:14Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=340625e618e1b37a72a02f07aa7144ae0ab0b19e'/>
<id>urn:sha1:340625e618e1b37a72a02f07aa7144ae0ab0b19e</id>
<content type='text'>
Using strscpy is cleaner, and avoids some problems with
handling maximum length strings.  Linus noticed the
original problem and Aurelien pointed out some additional
problems. Fortunately most of this is SMB1 code (and
in particular the ASCII string handling older, which
is less common).

Reported-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Reviewed-by: Aurelien Aptel &lt;aaptel@suse.com&gt;
Signed-off-by: Ronnie Sahlberg &lt;lsahlber@redhat.com&gt;
Signed-off-by: Steve French &lt;stfrench@microsoft.com&gt;
</content>
</entry>
<entry>
<title>CIFS: make mknod() an smb_version_op</title>
<updated>2019-03-15T00:32:36Z</updated>
<author>
<name>Aurelien Aptel</name>
</author>
<published>2019-03-14T05:29:17Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c847dccfbdc198671e80cd81891ff7a255606aea'/>
<id>urn:sha1:c847dccfbdc198671e80cd81891ff7a255606aea</id>
<content type='text'>
This cleanup removes cifs specific code from SMB2/SMB3 code paths
which is cleaner and easier to maintain as the code to handle
special files is improved.  Below is an example creating special files
using 'sfu' mount option over SMB3 to Windows (with this patch)
(Note that to Samba server, support for saving dos attributes
has to be enabled for the SFU mount option to work).

In the future this will also make implementation of creating
special files as reparse points easier (as Windows NFS server does
for example).

   root@smf-Thinkpad-P51:~# stat -c "%F" /mnt2/char
   character special file

   root@smf-Thinkpad-P51:~# stat -c "%F" /mnt2/block
   block special file

Signed-off-by: Aurelien Aptel &lt;aaptel@suse.com&gt;
Signed-off-by: Steve French &lt;stfrench@microsoft.com&gt;
Reviewed-by: Ronnie Sahlberg &lt;lsahlber@redhat.com&gt;
</content>
</entry>
<entry>
<title>cifs: Fix separator when building path from dentry</title>
<updated>2018-12-06T08:20:17Z</updated>
<author>
<name>Paulo Alcantara</name>
</author>
<published>2018-11-15T14:20:52Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c988de29ca161823db6a7125e803d597ef75b49c'/>
<id>urn:sha1:c988de29ca161823db6a7125e803d597ef75b49c</id>
<content type='text'>
Make sure to use the CIFS_DIR_SEP(cifs_sb) as path separator for
prefixpath too. Fixes a bug with smb1 UNIX extensions.

Fixes: a6b5058fafdf ("fs/cifs: make share unaccessible at root level mountable")
Signed-off-by: Paulo Alcantara &lt;palcantara@suse.com&gt;
Reviewed-by: Aurelien Aptel &lt;aaptel@suse.com&gt;
Signed-off-by: Steve French &lt;stfrench@microsoft.com&gt;
CC: Stable &lt;stable@vger.kernel.org&gt;
</content>
</entry>
<entry>
<title>get rid of 'opened' argument of -&gt;atomic_open() - part 3</title>
<updated>2018-07-12T14:04:20Z</updated>
<author>
<name>Al Viro</name>
</author>
<published>2018-06-08T17:32:02Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=44907d79002466049fdbb8ef15730d185e0808b4'/>
<id>urn:sha1:44907d79002466049fdbb8ef15730d185e0808b4</id>
<content type='text'>
now it can be done...

Acked-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>getting rid of 'opened' argument of -&gt;atomic_open() - part 1</title>
<updated>2018-07-12T14:04:19Z</updated>
<author>
<name>Al Viro</name>
</author>
<published>2018-06-08T15:44:56Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=be12af3ef5e61ebc44d065e121424ac605d7bb8e'/>
<id>urn:sha1:be12af3ef5e61ebc44d065e121424ac605d7bb8e</id>
<content type='text'>
'opened' argument of finish_open() is unused.  Kill it.

Signed-off-by Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
</feed>
