ksmbd: fix incorrect AllocationSize set in smb2_get_info
authorNamjae Jeon <linkinjeon@kernel.org>
Fri, 19 May 2023 14:11:33 +0000 (23:11 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 9 Jun 2023 08:34:27 +0000 (10:34 +0200)
commit4c6bdaacb3cbc4d77d4424e6e7d16c79e28ef494
tree73f863390b045e9be5e4c097b50de20f0180b040
parentf7add4d1598ac9df930568f37aa072588e938f20
ksmbd: fix incorrect AllocationSize set in smb2_get_info

commit 6cc2268f5647cbfde3d4fc2e4ee005070ea3a8d2 upstream.

If filesystem support sparse file, ksmbd should return allocated size
using ->i_blocks instead of stat->size. This fix generic/694 xfstests.

Cc: stable@vger.kernel.org
Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/ksmbd/smb2pdu.c