From patchwork Mon Jan 29 08:09:49 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Konstantin Komarov X-Patchwork-Id: 193319 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:2087:b0:106:209c:c626 with SMTP id gs7csp422768dyb; Mon, 29 Jan 2024 00:10:17 -0800 (PST) X-Google-Smtp-Source: AGHT+IELOGr/9bh4xE6XD1AF1DJYFwko2dtIC7xBkupBWCOyOkOCVK8hcxeKJxmxkR6Y4jHRgvjL X-Received: by 2002:a17:906:d10a:b0:a34:dbdc:929b with SMTP id b10-20020a170906d10a00b00a34dbdc929bmr3703782ejz.0.1706515817179; Mon, 29 Jan 2024 00:10:17 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706515817; cv=pass; d=google.com; s=arc-20160816; b=SRBk5DsbY62vWEcMn+WUqBONtKAOtg5tkThO9WdgoYlZ36IBeh7vqMnfd37Cxw9WEe 27glv3MdnJhyBXyqX6BfT5rtBDf6Wvip4I/r5M8nFZ3vtDDaBIn9F1YhSeOpTpbJ66VD hNRtXea7RFNLFaeP9NqiJuu3gsZp8pf6v7vT+fPS3Mkm+Jejl2HiCw72sm9/gB3vYT5d qGuOKl/ryf7reJUzd7d4LdD3l28ZXhwMWqaj1I13KmKOxN77z1sc55J8W1FqJ5GkEYWz cTGSrT5QjOIgELNZzHyfwJAtZ22Atx3h96anTLSXui64HnHLiQgLxlGea+nb7ltZdHCm nzkw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:references:cc:to:from :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=OOsG9oL5dHVVYoMwTwA8sDDvVQSxjrxSXBRzmTmF2nw=; fh=P7I85FIabZcM8ojWdeG8ABpTZepe/Xtte9jKWDfUHBM=; b=nhHvuHBCVYHr6+XZz/pdbCCctQ7irRfndSqrSyoksEiYMAbEHBLi76XM2pIMRUqk2P dMUgEIvbP8z0bOgxzd8gJvV31+KWne/6q1ehLKS3qaaCTYjpkpGIaYbaFdWh4qX4aLwX xkRpguZ8vlrbzWwu3AOFXBldCxAyqrGnEmDoTgqoz3dGX9Kjnfga4gRueUxAg9+/eeTr xMRkBtRCRiSl86gA0MWUZJgrnxIk1MxOOa/LVUVrQybgIr7A6xPj0uhe2dqOyLNfk1U+ 39y6HqgA/7xHtPvcpyfY++T1KmoUlAfUZgelF7ghDAkhPp+dQdadQNzSb7ojfREy05MS X1/Q== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@paragon-software.com header.s=mail header.b=CvaSyzMn; arc=pass (i=1 spf=pass spfdomain=paragon-software.com dkim=pass dkdomain=paragon-software.com dmarc=pass fromdomain=paragon-software.com); spf=pass (google.com: domain of linux-kernel+bounces-42333-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-42333-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=paragon-software.com Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id u13-20020a170906068d00b00a351eb552cdsi2664126ejb.466.2024.01.29.00.10.16 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Jan 2024 00:10:17 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-42333-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@paragon-software.com header.s=mail header.b=CvaSyzMn; arc=pass (i=1 spf=pass spfdomain=paragon-software.com dkim=pass dkdomain=paragon-software.com dmarc=pass fromdomain=paragon-software.com); spf=pass (google.com: domain of linux-kernel+bounces-42333-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-42333-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=paragon-software.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 54BCE1F217F9 for ; Mon, 29 Jan 2024 08:10:16 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 362BB5380C; Mon, 29 Jan 2024 08:09:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=paragon-software.com header.i=@paragon-software.com header.b="CvaSyzMn" Received: from relayaws-01.paragon-software.com (relayaws-01.paragon-software.com [35.157.23.187]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 322A2524D1; Mon, 29 Jan 2024 08:09:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=35.157.23.187 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706515793; cv=none; b=DyDkCZ6yJWhWhDh16vjIrxeGHutEzoVDCE8pE+ZmnUsqj/xLa03kE3ZkFOceras0oHGTUX4LokfHrSmH/riuqWQ2fzRucXccoSoTJ5ODEg0tfvQXM1iHJ4bzeLN+hEm6I7rQbDJr7nBXl//b6J+ZFuSylwAOfaOh8Arnx4frMGA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706515793; c=relaxed/simple; bh=KX95JtnfIp7j8VPbIRjew5/zzGHwozjZO+7zxqvr6n4=; h=Message-ID:Date:MIME-Version:Subject:From:To:CC:References: In-Reply-To:Content-Type; b=MaQJhnH63sIoVgy6pw1smoRMH5aHXeREmjNlOOnCuyLsxh6n7sVp8EWnED+nDx8Ql8KBdRke5LrVsGLQmaF0VuOJk0X5MbkgCwSfrMjqckT0DzHoEREM8IZVwgNYPDBpEJvjMEhGMA8HV+9kJcOoJIVCJN/1ycuS7We+obto2G8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=paragon-software.com; spf=pass smtp.mailfrom=paragon-software.com; dkim=pass (1024-bit key) header.d=paragon-software.com header.i=@paragon-software.com header.b=CvaSyzMn; arc=none smtp.client-ip=35.157.23.187 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=paragon-software.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=paragon-software.com Received: from dlg2.mail.paragon-software.com (vdlg-exch-02.paragon-software.com [172.30.1.105]) by relayaws-01.paragon-software.com (Postfix) with ESMTPS id E9FB3211A; Mon, 29 Jan 2024 08:02:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paragon-software.com; s=mail; t=1706515380; bh=OOsG9oL5dHVVYoMwTwA8sDDvVQSxjrxSXBRzmTmF2nw=; h=Date:Subject:From:To:CC:References:In-Reply-To; b=CvaSyzMnnyoXfENdmRZuDjgsGfGg6Hucbb6A9eG1C8gZkkMh7b9EryaYA41RJvThq FmGP4pdlWQtHvkJ93jZSeYSYg0cl5IZgxk9D6r8exkhSv638R3/uK4eDlhQN2NW9ay Gzy+6XGAMsTuGr36+5vxEm3RsJGusY68D3f6I7/w= Received: from [192.168.211.199] (192.168.211.199) by vdlg-exch-02.paragon-software.com (172.30.1.105) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.7; Mon, 29 Jan 2024 11:09:49 +0300 Message-ID: <75e61877-b616-4227-bca6-83580442d822@paragon-software.com> Date: Mon, 29 Jan 2024 11:09:49 +0300 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: [PATCH 5/5] fs/ntfs3: Update inode->i_size after success write into compressed file Content-Language: en-US From: Konstantin Komarov To: CC: , References: In-Reply-To: X-ClientProxiedBy: vobn-exch-01.paragon-software.com (172.30.72.13) To vdlg-exch-02.paragon-software.com (172.30.1.105) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1789411529335529994 X-GMAIL-MSGID: 1789411529335529994 Reported-by: Giovanni Santini Signed-off-by: Konstantin Komarov ---  fs/ntfs3/file.c | 2 ++  1 file changed, 2 insertions(+)  } diff --git a/fs/ntfs3/file.c b/fs/ntfs3/file.c index b702543a8795..691b0c9b95ae 100644 --- a/fs/ntfs3/file.c +++ b/fs/ntfs3/file.c @@ -1054,6 +1054,8 @@ static ssize_t ntfs_compress_write(struct kiocb *iocb, struct iov_iter *from)      iocb->ki_pos += written;      if (iocb->ki_pos > ni->i_valid)          ni->i_valid = iocb->ki_pos; +    if (iocb->ki_pos > i_size) +        i_size_write(inode, iocb->ki_pos);      return written;