[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <bac53deae60fbf5dbcb19feb403d9e9f@manguebit.com>
Date: Wed, 02 Apr 2025 12:23:48 -0300
From: Paulo Alcantara <pc@...guebit.com>
To: David Howells <dhowells@...hat.com>, Steve French <stfrench@...rosoft.com>
Cc: dhowells@...hat.com, Matthew Wilcox <willy@...radead.org>,
linux-cifs@...r.kernel.org, netfs@...ts.linux.dev,
linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] cifs: Remove cifs_truncate_page() as it should be
superfluous
David Howells <dhowells@...hat.com> writes:
> 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?]
I don't think that's necessary as the current inode will be marked for
revalidation (e.g. cifsInodeInfo::time is set to 0), so next call to
cifs_fattr_to_inode() will update inode->i_blocks. If it isn't being
updated, then I'm missing something else.
> Signed-off-by: David Howells <dhowells@...hat.com>
> cc: Steve French <stfrench@...rosoft.com>
> cc: Paulo Alcantara (Red Hat) <pc@...guebit.com>
> cc: Matthew Wilcox <willy@...radead.org>
> cc: linux-cifs@...r.kernel.org
> cc: netfs@...ts.linux.dev
> cc: linux-fsdevel@...r.kernel.org
> ---
> fs/smb/client/cifsfs.h | 1 -
> fs/smb/client/inode.c | 19 -------------------
> fs/smb/client/smb2ops.c | 2 --
> 3 files changed, 22 deletions(-)
Looks good,
Reviewed-by: Paulo Alcantara (Red Hat) <pc@...guebit.com>
Powered by blists - more mailing lists