]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-client.git/commit
smb: client: fix generic/694 due to wrong ->i_blocks
authorPaulo Alcantara <pc@manguebit.org>
Thu, 19 Mar 2026 00:43:51 +0000 (21:43 -0300)
committerSteve French <stfrench@microsoft.com>
Thu, 19 Mar 2026 18:56:25 +0000 (13:56 -0500)
commit23b5df09c27aec13962b30d32a4167ebdd043f8e
tree387ef8c29643ed9e9c72a57a74f6bda125a93de4
parent50bfd2a22b75a904d5900d64530ae1b69a69907c
smb: client: fix generic/694 due to wrong ->i_blocks

When updating ->i_size, make sure to always update ->i_blocks as well
until we query new allocation size from the server.

generic/694 was failing because smb3_simple_falloc() was missing the
update of ->i_blocks after calling cifs_setsize().  So, fix this by
updating ->i_blocks directly in cifs_setsize(), so all places that
call it doesn't need to worry about updating ->i_blocks later.

Reported-by: Shyam Prasad N <sprasad@microsoft.com>
Closes: https://lore.kernel.org/r/CANT5p=rqgRwaADB=b_PhJkqXjtfq3SFv41SSTXSVEHnuh871pA@mail.gmail.com
Signed-off-by: Paulo Alcantara (Red Hat) <pc@manguebit.org>
Cc: David Howells <dhowells@redhat.com>
Cc: linux-cifs@vger.kernel.org
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/smb/client/cifsglob.h
fs/smb/client/file.c
fs/smb/client/inode.c
fs/smb/client/smb2ops.c