<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/fs/cifs/inode.c, branch linux-4.4.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.4.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.4.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2020-07-31T14:43:14Z</updated>
<entry>
<title>Revert "cifs: Fix the target file was deleted when rename failed."</title>
<updated>2020-07-31T14:43:14Z</updated>
<author>
<name>Steve French</name>
</author>
<published>2020-07-23T19:41:29Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=39c6ea8661bd21979fee2a7d4078d9277e42ffa9'/>
<id>urn:sha1:39c6ea8661bd21979fee2a7d4078d9277e42ffa9</id>
<content type='text'>
commit 0e6705182d4e1b77248a93470d6d7b3013d59b30 upstream.

This reverts commit 9ffad9263b467efd8f8dc7ae1941a0a655a2bab2.

Upon additional testing with older servers, it was found that
the original commit introduced a regression when using the old SMB1
dialect and rsyncing over an existing file.

The patch will need to be respun to address this, likely including
a larger refactoring of the SMB1 and SMB3 rename code paths to make
it less confusing and also to address some additional rename error
cases that SMB3 may be able to workaround.

Signed-off-by: Steve French &lt;stfrench@microsoft.com&gt;
Reported-by: Patrick Fernie &lt;patrick.fernie@gmail.com&gt;
CC: Stable &lt;stable@vger.kernel.org&gt;
Acked-by: Ronnie Sahlberg &lt;lsahlber@redhat.com&gt;
Acked-by: Pavel Shilovsky &lt;pshilov@microsoft.com&gt;
Acked-by: Zhang Xiaoxu &lt;zhangxiaoxu5@huawei.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>cifs: Fix the target file was deleted when rename failed.</title>
<updated>2020-07-09T07:35:09Z</updated>
<author>
<name>Zhang Xiaoxu</name>
</author>
<published>2020-06-29T01:06:38Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=3fe62ca7096cd9ae74b07282e79b9568d4a129a3'/>
<id>urn:sha1:3fe62ca7096cd9ae74b07282e79b9568d4a129a3</id>
<content type='text'>
commit 9ffad9263b467efd8f8dc7ae1941a0a655a2bab2 upstream.

When xfstest generic/035, we found the target file was deleted
if the rename return -EACESS.

In cifs_rename2, we unlink the positive target dentry if rename
failed with EACESS or EEXIST, even if the target dentry is positived
before rename. Then the existing file was deleted.

We should just delete the target file which created during the
rename.

Reported-by: Hulk Robot &lt;hulkci@huawei.com&gt;
Signed-off-by: Zhang Xiaoxu &lt;zhangxiaoxu5@huawei.com&gt;
Cc: stable@vger.kernel.org
Signed-off-by: Steve French &lt;stfrench@microsoft.com&gt;
Reviewed-by: Aurelien Aptel &lt;aaptel@suse.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>cifs: don't leak -EAGAIN for stat() during reconnect</title>
<updated>2020-03-11T06:51:17Z</updated>
<author>
<name>Ronnie Sahlberg</name>
</author>
<published>2020-02-18T20:01:03Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=96c2df3e562bc5dbeab189b243eabcf0e42502c2'/>
<id>urn:sha1:96c2df3e562bc5dbeab189b243eabcf0e42502c2</id>
<content type='text'>
commit fc513fac56e1b626ae48a74d7551d9c35c50129e upstream.

If from cifs_revalidate_dentry_attr() the SMB2/QUERY_INFO call fails with an
error, such as STATUS_SESSION_EXPIRED, causing the session to be reconnected
it is possible we will leak -EAGAIN back to the application even for
system calls such as stat() where this is not a valid error.

Fix this by re-trying the operation from within cifs_revalidate_dentry_attr()
if cifs_get_inode_info*() returns -EAGAIN.

This fixes stat() and possibly also other system calls that uses
cifs_revalidate_dentry*().

Signed-off-by: Ronnie Sahlberg &lt;lsahlber@redhat.com&gt;
Signed-off-by: Steve French &lt;stfrench@microsoft.com&gt;
Reviewed-by: Pavel Shilovsky &lt;pshilov@microsoft.com&gt;
Reviewed-by: Aurelien Aptel &lt;aaptel@suse.com&gt;
CC: Stable &lt;stable@vger.kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>cifs: Fix mode output in debugging statements</title>
<updated>2020-03-11T06:51:12Z</updated>
<author>
<name>Frank Sorenson</name>
</author>
<published>2020-02-12T21:31:48Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a87e483e856e10951e11aab67433bb43afbda812'/>
<id>urn:sha1:a87e483e856e10951e11aab67433bb43afbda812</id>
<content type='text'>
[ Upstream commit f52aa79df43c4509146140de0241bc21a4a3b4c7 ]

A number of the debug statements output file or directory mode
in hex.  Change these to print using octal.

Signed-off-by: Frank Sorenson &lt;sorenson@redhat.com&gt;
Signed-off-by: Steve French &lt;stfrench@microsoft.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>CIFS: Force revalidate inode when dentry is stale</title>
<updated>2019-10-17T20:41:05Z</updated>
<author>
<name>Pavel Shilovsky</name>
</author>
<published>2019-09-30T17:06:19Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=91fdb3cf4cf50c13dfb8dca7824f17aceec68a73'/>
<id>urn:sha1:91fdb3cf4cf50c13dfb8dca7824f17aceec68a73</id>
<content type='text'>
[ Upstream commit c82e5ac7fe3570a269c0929bf7899f62048e7dbc ]

Currently the client indicates that a dentry is stale when inode
numbers or type types between a local inode and a remote file
don't match. If this is the case attributes is not being copied
from remote to local, so, it is already known that the local copy
has stale metadata. That's why the inode needs to be marked for
revalidation in order to tell the VFS to lookup the dentry again
before openning a file. This prevents unexpected stale errors
to be returned to the user space when openning a file.

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;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>cifs: Check uniqueid for SMB2+ and return -ESTALE if necessary</title>
<updated>2019-10-17T20:41:04Z</updated>
<author>
<name>Ross Lagerwall</name>
</author>
<published>2015-12-02T14:46:08Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=4701063a62a69fbdef49a25e505c510040dab1bd'/>
<id>urn:sha1:4701063a62a69fbdef49a25e505c510040dab1bd</id>
<content type='text'>
[ Upstream commit a108471b5730b52017e73b58c9f486319d2ac308 ]

Commit 7196ac113a4f ("Fix to check Unique id and FileType when client
refer file directly.") checks whether the uniqueid of an inode has
changed when getting the inode info, but only when using the UNIX
extensions. Add a similar check for SMB2+, since this can be done
without an extra network roundtrip.

Signed-off-by: Ross Lagerwall &lt;ross.lagerwall@citrix.com&gt;
Signed-off-by: Steve French &lt;smfrench@gmail.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>cifs: do not attempt cifs operation on smb2+ rename error</title>
<updated>2019-05-16T17:44:43Z</updated>
<author>
<name>Frank Sorenson</name>
</author>
<published>2019-04-16T13:37:27Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=fd49607468bacd5003cd146de2c4e0f135bff777'/>
<id>urn:sha1:fd49607468bacd5003cd146de2c4e0f135bff777</id>
<content type='text'>
commit 652727bbe1b17993636346716ae5867627793647 upstream.

A path-based rename returning EBUSY will incorrectly try opening
the file with a cifs (NT Create AndX) operation on an smb2+ mount,
which causes the server to force a session close.

If the mount is smb2+, skip the fallback.

Signed-off-by: Frank Sorenson &lt;sorenson@redhat.com&gt;
Signed-off-by: Steve French &lt;stfrench@microsoft.com&gt;
CC: Stable &lt;stable@vger.kernel.org&gt;
Reviewed-by: Ronnie Sahlberg &lt;lsahlber@redhat.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>cifs: fallback to older infolevels on findfirst queryinfo retry</title>
<updated>2019-04-27T07:33:58Z</updated>
<author>
<name>Steve French</name>
</author>
<published>2018-10-19T06:58:22Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=740562f32daa2ed881c0f3e1430a6f67dda15199'/>
<id>urn:sha1:740562f32daa2ed881c0f3e1430a6f67dda15199</id>
<content type='text'>
[ Upstream commit 3b7960caceafdfc2cdfe2850487f8d091eb41144 ]

In cases where queryinfo fails, we have cases in cifs (vers=1.0)
where with backupuid mounts we retry the query info with findfirst.
This doesn't work to some NetApp servers which don't support
WindowsXP (and later) infolevel 261 (SMB_FIND_FILE_ID_FULL_DIR_INFO)
so in this case use other info levels (in this case it will usually
be level 257, SMB_FIND_FILE_DIRECTORY_INFO).

(Also fixes some indentation)

See kernel bugzilla 201435

Signed-off-by: Steve French &lt;stfrench@microsoft.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>smb3: do not attempt cifs operation in smb3 query info error path</title>
<updated>2018-11-21T08:27:35Z</updated>
<author>
<name>Steve French</name>
</author>
<published>2018-10-19T05:45:21Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ae83508da422b1c6ec5a1409ca15c0f5f33cff31'/>
<id>urn:sha1:ae83508da422b1c6ec5a1409ca15c0f5f33cff31</id>
<content type='text'>
commit 1e77a8c204c9d1b655c61751b8ad0fde22421dbb upstream.

If backupuid mount option is sent, we can incorrectly retry
(on access denied on query info) with a cifs (FindFirst) operation
on an smb3 mount which causes the server to force the session close.

We set backup intent on open so no need for this fallback.

See kernel bugzilla 201435

Signed-off-by: Steve French &lt;stfrench@microsoft.com&gt;
CC: Stable &lt;stable@vger.kernel.org&gt;
Reviewed-by: Ronnie Sahlberg &lt;lsahlber@redhat.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>smb3: Do not send SMB3 SET_INFO if nothing changed</title>
<updated>2018-09-05T07:18:37Z</updated>
<author>
<name>Steve French</name>
</author>
<published>2018-08-03T01:28:18Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ff3bb182bc12ee1f852fd7f80dd8d9ce040f2462'/>
<id>urn:sha1:ff3bb182bc12ee1f852fd7f80dd8d9ce040f2462</id>
<content type='text'>
commit fd09b7d3b352105f08b8e02f7afecf7e816380ef upstream.

An earlier commit had a typo which prevented the
optimization from working:

commit 18dd8e1a65dd ("Do not send SMB3 SET_INFO request if nothing is changing")

Thank you to Metze for noticing this.  Also clear a
reserved field in the FILE_BASIC_INFO struct we send
that should be zero (all the other fields in that
struct were set or cleared explicitly already in
cifs_set_file_info).

Reviewed-by: Pavel Shilovsky &lt;pshilov@microsoft.com&gt;
CC: Stable &lt;stable@vger.kernel.org&gt; # 4.9.x+
Reported-by: Stefan Metzmacher &lt;metze@samba.org&gt;
Signed-off-by: Steve French &lt;stfrench@microsoft.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
</feed>
