Received: by 2002:a05:7412:40d:b0:e2:908c:2ebd with SMTP id 13csp949647rdf; Wed, 22 Nov 2023 01:02:55 -0800 (PST) X-Google-Smtp-Source: AGHT+IGxBok5a1N0zB/Zn1rfhmnSr+ys+GUL+IdRogLQjLpbAVLg9UUZhK7nKl2XSSLsim+lFxit X-Received: by 2002:aa7:9987:0:b0:6cb:6880:752 with SMTP id k7-20020aa79987000000b006cb68800752mr1702283pfh.17.1700643775016; Wed, 22 Nov 2023 01:02:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700643775; cv=none; d=google.com; s=arc-20160816; b=ZTXtKecdhG4SMvta8M5lWBvKcUeSdce1FapqVMIbSWzYfvuZ3nPq+nItwDZauUN8HG +Zvtx3Z4DzuxMut2INCOhsL85vVw2y+fV47N+y9uocwNv1vmGFlJ8ruSrT8iu8G+3mQG iX0tL84pUkcw5hSfVtHV0R0ZxQV/ztHMvubv9bWlAR5x8m7WUjnAHLEUYzjDjcpPTi+X f87G9VpPMxADVXR8OHRn29oaLPmyH18JCodvRiYruGFR3SAUclxvQJkeexgBTm7lentU xrfBjN7i8VQXIOG+gN/Ng9QUZo0e+l1/vdnfKYImrrBbqOY01qcTYKOIzoI7XCj+fhQM b7vg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=tokSOc0TdXG/uQLa497JlHnMMxnPUsueInaFp+BfTKw=; fh=ZeWVe7LLKNmR5yZ6qGGONVJTPDuva4pXEs02NTj9FiI=; b=QJ/zi+hifSV5x//Jn2h+W2VoDrFGu2M0Xo1BpBMbIrrhOpyfyaeZVOVQpQNE7YvDCg 3rPCoQ3h9GMxRsPP7p5ohJvqInwVJx3VHPsIPB4UgOyi1I41hfZ5eDmMehelm4s9i+8X r5e8FNVLEGu36prNqTiIVKnfvm6vSrJej4xi2vnUmBhNoZgrknuUMziXB8bKIy8MDlRd c/e3QtU0+5gVM+/i7dSGbl6P/5GVIAFarjf9uF6CEer/tDJHQqEp0iPZ8PU0tnjfa9zV K3nLHe65eOx9XTkvydaSV1YWj1P2463D7B/gPLQ2Q+tiGtFNtF0jrnBQodLfMsOAruf5 O+Xg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=k2xzfo28; spf=pass (google.com: domain of linux-ext4+bounces-78-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-ext4+bounces-78-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id f12-20020a056a001acc00b006baae7ecfacsi12362687pfv.308.2023.11.22.01.02.54 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Nov 2023 01:02:55 -0800 (PST) Received-SPF: pass (google.com: domain of linux-ext4+bounces-78-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=k2xzfo28; spf=pass (google.com: domain of linux-ext4+bounces-78-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-ext4+bounces-78-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 3D78C2817AE for ; Wed, 22 Nov 2023 09:02:54 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8D6BE3C088; Wed, 22 Nov 2023 09:02:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="k2xzfo28" X-Original-To: linux-ext4@vger.kernel.org Received: from mail-oa1-x34.google.com (mail-oa1-x34.google.com [IPv6:2001:4860:4864:20::34]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 090672D63; Wed, 22 Nov 2023 01:02:26 -0800 (PST) Received: by mail-oa1-x34.google.com with SMTP id 586e51a60fabf-1efad296d42so3735574fac.2; Wed, 22 Nov 2023 01:02:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1700643744; x=1701248544; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=tokSOc0TdXG/uQLa497JlHnMMxnPUsueInaFp+BfTKw=; b=k2xzfo28Mxy8PUVjU9Gv5HTAmzX8GnuLY0oxHRB+2ffTZSiuc/71Hn1Jpkz+HoVUBi Jhp0z7TJjxnkDMASb0Lunk0CKTzQnHHucjA/ZmU4ZPFvGZTZYx6D4Yf1nGRQ5B9LxQEW 5YnKb+AYZeknpKqiJ+mrMBif1l5cM8F2t43/tsXne4WeC1qX7LinGEctVEgPGH0DEEHx VUWVf8X6Y+J1t30iJ4hII3KCMg/DI+6K5gEytAU/kyhNtvqdzfWNNnSMdje9wMw7tfLW 30o0sVIXSLYtafGk0zK01jIrqV3NB+hhnxZikBVq8qbBfNh45oMVhP3o/xsMdkI3HU30 ouUg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700643744; x=1701248544; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=tokSOc0TdXG/uQLa497JlHnMMxnPUsueInaFp+BfTKw=; b=L6bI3heJ+ykCMlmreZchiB7+zxWo3ejKv7ScuOitAk/cIJTjZFPtenvpvS9LXNvhfg Mzf/Oul6vf7LyOKwICXbtz5jq0CvYKrM+jYuP+vCBj8XhnSqWnbeCvMfG/j4DSeC4Qae FFC/+901PtF2jp1phCpABcRg+/Y22IIQCJfDQIMPbntCgA/xQMcwEWenBe5T69K3i+y5 Ak0Ohn8KJgBIkC9523sD2d0Y2jBIB/bWXzTcnNusMNne6peCQqkV/jyEdxysSnzN7ubh uK7CZ8OoJKsARNc3qBE/Hxq8jc//KJhSn8y0EtQtlApwZPLDGq/o2W7xZGkzjp6GBs/p +MAw== X-Gm-Message-State: AOJu0YyIY8g/atqYQCZdXva9XnAlSqYuBr/nplK7clZ2lw0SQqUw+CbB yP5ZzG/9ceTLmSZXhdueA40o1PurE6Q= X-Received: by 2002:a05:6870:9b0c:b0:1f5:b5ca:435e with SMTP id hq12-20020a0568709b0c00b001f5b5ca435emr1917525oab.52.1700643743997; Wed, 22 Nov 2023 01:02:23 -0800 (PST) Received: from dw-tp.c4p-in.ibmmobiledemo.com ([129.41.58.16]) by smtp.gmail.com with ESMTPSA id o9-20020a62cd09000000b006c8b14f3f0asm9717646pfg.117.2023.11.22.01.02.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Nov 2023 01:02:23 -0800 (PST) From: "Ritesh Harjani (IBM)" To: linux-ext4@vger.kernel.org Cc: Jan Kara , linux-fsdevel@vger.kernel.org, "Ritesh Harjani (IBM)" , stable@vger.kernel.org, Christoph Hellwig Subject: [PATCHv2] ext2: Fix ki_pos update for DIO buffered-io fallback case Date: Wed, 22 Nov 2023 14:32:15 +0530 Message-ID: X-Mailer: git-send-email 2.41.0 Precedence: bulk X-Mailing-List: linux-ext4@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Commit "filemap: update ki_pos in generic_perform_write", made updating of ki_pos into common code in generic_perform_write() function. This also causes generic/091 to fail. This happened due to an in-flight collision with: fb5de4358e1a ("ext2: Move direct-io to use iomap"). I have chosen fixes tag based on which commit got landed later to upstream kernel. Fixes: 182c25e9c157 ("filemap: update ki_pos in generic_perform_write") Cc: stable@vger.kernel.org Reviewed-by: Christoph Hellwig Signed-off-by: Ritesh Harjani (IBM) --- fs/ext2/file.c | 1 - 1 file changed, 1 deletion(-) diff --git a/fs/ext2/file.c b/fs/ext2/file.c index 1039e5bf90af..4ddc36f4dbd4 100644 --- a/fs/ext2/file.c +++ b/fs/ext2/file.c @@ -258,7 +258,6 @@ static ssize_t ext2_dio_write_iter(struct kiocb *iocb, struct iov_iter *from) goto out_unlock; } - iocb->ki_pos += status; ret += status; endbyte = pos + status - 1; ret2 = filemap_write_and_wait_range(inode->i_mapping, pos, -- 2.41.0