]> www.infradead.org Git - users/dwmw2/linux.git/commit
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:48:24 +0000 (10:48 +0200)
commit82c0ee2a15ba1e8406109269f9f6a9c1cea29b7e
treede946393993e5343f71a5d6d35dfc232304c5ccc
parentf8f40dd95cf3ca42837b1c7aa082128e13f3b215
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