]> git.baikalelectronics.ru Git - kernel.git/commit
cifs: fix incorrect handling of smb2_set_sparse() return in smb3_simple_falloc
authorRonnie Sahlberg <lsahlber@redhat.com>
Thu, 14 Mar 2019 14:08:48 +0000 (00:08 +1000)
committerSteve French <stfrench@microsoft.com>
Fri, 15 Mar 2019 00:32:36 +0000 (19:32 -0500)
commitee9732658e0940fa87e8dcb2b3c86afde4a1cea1
tree6cd28e77b19fbc646d3a8a1e9371fab6e136e095
parent21de37246ed432caeaf9a2c05268647794f4ac2b
cifs: fix incorrect handling of smb2_set_sparse() return in smb3_simple_falloc

smb2_set_sparse does not return -errno, it returns a boolean where
true means success.
Change this to just ignore the return value just like the other callsites.

Additionally add code to handle the case where we must set the file sparse
and possibly also extending it.

Fixes xfstests: generic/236 generic/350 generic/420

Signed-off-by: Ronnie Sahlberg <lsahlber@redhat.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/cifs/smb2ops.c