[PATCH v2 06/92] cifs: update the ctime on a partial page write
smfrench at gmail.com
Thu Jul 6 04:50:15 UTC 2023
this looks useful (although we have a few more serious problems where we
don't keep the cached mtime/ctime/size for files that have RW or RWH leases
so can update the mtime/ctime/size from the server version of it which can
be stale in cases where we are caching writes (with leases).
Which tree do you want this patch to go through?
On Wed, Jul 5, 2023 at 2:04 PM Jeff Layton <jlayton at kernel.org> wrote:
> POSIX says:
> "Upon successful completion, where nbyte is greater than 0, write()
> shall mark for update the last data modification and last file status
> change timestamps of the file..."
> Add the missing ctime update.
> Signed-off-by: Jeff Layton <jlayton at kernel.org>
> fs/smb/client/file.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
> diff --git a/fs/smb/client/file.c b/fs/smb/client/file.c
> index 879bc8e6555c..0a5fe8d5314b 100644
> --- a/fs/smb/client/file.c
> +++ b/fs/smb/client/file.c
> @@ -2596,7 +2596,7 @@ static int cifs_partialpagewrite(struct page *page,
> unsigned from, unsigned to)
> write_data, to - from, &offset);
> /* Does mm or vfs already set times? */
> - inode->i_atime = inode->i_mtime = current_time(inode);
> + inode->i_atime = inode->i_mtime = inode->i_ctime =
> if ((bytes_written > 0) && (offset))
> rc = 0;
> else if (bytes_written < 0)
More information about the samba-technical