]> git.ipfire.org Git - thirdparty/linux.git/commit
cifs: Remove cifs_truncate_page() as it should be superfluous
authorDavid Howells <dhowells@redhat.com>
Tue, 1 Apr 2025 15:01:02 +0000 (16:01 +0100)
committerSteve French <stfrench@microsoft.com>
Thu, 3 Apr 2025 01:00:39 +0000 (20:00 -0500)
commitf83e10a233059b74eaa2716e903b57464b3d3b0c
tree3ba2fc3de60f6e6347edf94dd18012514bbaa452
parente97aec7889543663202e24ec51e1e2f9cb236472
cifs: Remove cifs_truncate_page() as it should be superfluous

The calls to cifs_truncate_page() should be superfluous as the places that
call it also call truncate_setsize() or cifs_setsize() and therefore
truncate_pagecache() which should also clear the tail part of the folio
containing the EOF marker.

Further, smb3_simple_falloc() calls both cifs_setsize() and
truncate_setsize() in addition to cifs_truncate_page().

Remove the superfluous calls.

This gets rid of another function referring to struct page.

[Should cifs_setsize() also set inode->i_blocks?]

Signed-off-by: David Howells <dhowells@redhat.com>
cc: Steve French <stfrench@microsoft.com>
Reviewed-by: Paulo Alcantara (Red Hat) <pc@manguebit.com>
cc: Matthew Wilcox <willy@infradead.org>
cc: linux-cifs@vger.kernel.org
cc: netfs@lists.linux.dev
cc: linux-fsdevel@vger.kernel.org
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/smb/client/cifsfs.h
fs/smb/client/inode.c
fs/smb/client/smb2ops.c