cifs: when extending a file with falloc we should make files not-sparse
authorRonnie Sahlberg <lsahlber@redhat.com>
Tue, 31 May 2022 22:48:38 +0000 (08:48 +1000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 9 Jun 2022 08:22:29 +0000 (10:22 +0200)
commit791f532de70dae10ae037b8c0df31d355fc27952
tree4b883c7e7ace7ead109ddb70453bfb77355c4187
parentce0008a0e410cdd95f0d8cd81b2902ec10a660c4
cifs: when extending a file with falloc we should make files not-sparse

commit f66f8b94e7f2f4ac9fffe710be231ca8f25c5057 upstream.

as this is the only way to make sure the region is allocated.
Fix the conditional that was wrong and only tried to make already
non-sparse files non-sparse.

Cc: stable@vger.kernel.org
Signed-off-by: Ronnie Sahlberg <lsahlber@redhat.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/cifs/smb2ops.c