Received: by 2002:ab2:6309:0:b0:1fb:d597:ff75 with SMTP id s9csp1006757lqt; Fri, 7 Jun 2024 05:40:56 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWV5Rha9sP7MZLN3mxH/M/wU4ADxfaFG5NwTqbXYRUOxMQBPVQFyr5prADhwiUFqwp5cDYAfwzF0/dwgw7aIb1/3x5EASS7ki77UkWQgg== X-Google-Smtp-Source: AGHT+IG52hNX//UxRGgxAnfOgHLqUDpugE+bOnD6iadZ85618k83HtLON1LEdUikCOQuXZ+klEv3 X-Received: by 2002:a92:c244:0:b0:374:a6a3:333b with SMTP id e9e14a558f8ab-375803ab3f5mr28616835ab.28.1717764056642; Fri, 07 Jun 2024 05:40:56 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717764056; cv=pass; d=google.com; s=arc-20160816; b=S75GLbad4fl/rSQcmzBD2hbtazKp4lq6XxoT95ySYovXPRWCSbRbS/zMgkyRG+Rlfv yT8XRnnbiRa5xZdPm4hpEsxnviYbg39fzgHpEA8CkQyEuBWKn7lLNAvmUNxNzA8KY71d AUfJ4nL/td2BkcIR2t39mMFmal7SZCyKPiFNVXEnsuG4Fq+lV2qfaa9UXQFhk4zNtuT5 1ttcdJpCDPv0cP13Wyi9RJ9Pq6X/2dGdn/IRWxPWhBL7uufNHNdQ9+zu0QTHJwsJnbJB 57bJHlK3c62h2nL2V1x9J7PiBqttIR8YTw0yZXQHbf7Idy/VvET53I0RZopwRq04zwYE eL0w== ARC-Message-Signature: i=2; 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:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature:dkim-signature; bh=PLpDTAuPwmuChFu88p0R105H1Nq2kjyzVIh/lCRxU/o=; fh=xoZo938iZo6Zo9BQRi1y1Y/2pdszedQYQQiMhZQzvOk=; b=1EACVFAHSfblUIDFGfZ+8mDyB/CmpwhraPOHfzC/Qn1zU45nxmadL4GGGdkZ0Cywlp Gm4wZT2WD6EJcPZ7xqF37pF32whZfnzv19yvFqtxTQamyAOLb0hLp8KvQPpyOsv+TvL2 si7RQWGHM825uoAdHpTqLZ7DDOGcf2Md2MixZgOL2rh1EUUyA6PccR+cOzOeBHBbTUJ1 dMWNu3DWNBvLdY0RHIIICC0Ha6RLSR+HxQsIN7rD5rhFh9U4/4iCJWNE0ZOb4wsPTEIA 6RaP9DcsjZdDAl1HKMWlbzr9kEsbTrnl+yS/+PhDMut4xSK/guMyBuoRG8qdzvBE+otw utYw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@paragon-software.com header.s=mail header.b=d0NqXQm8; dkim=pass header.i=@paragon-software.com header.s=mail header.b=gjneoprT; arc=pass (i=1 spf=pass spfdomain=paragon-software.com dkim=pass dkdomain=paragon-software.com dkim=pass dkdomain=paragon-software.com dmarc=pass fromdomain=paragon-software.com); spf=pass (google.com: domain of linux-kernel+bounces-205997-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-205997-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=paragon-software.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id 41be03b00d2f7-6de28959556si2920033a12.594.2024.06.07.05.40.56 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 07 Jun 2024 05:40:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-205997-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@paragon-software.com header.s=mail header.b=d0NqXQm8; dkim=pass header.i=@paragon-software.com header.s=mail header.b=gjneoprT; arc=pass (i=1 spf=pass spfdomain=paragon-software.com dkim=pass dkdomain=paragon-software.com dkim=pass dkdomain=paragon-software.com dmarc=pass fromdomain=paragon-software.com); spf=pass (google.com: domain of linux-kernel+bounces-205997-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-205997-linux.lists.archive=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 sy.mirrors.kernel.org (Postfix) with ESMTPS id E2646B22F22 for ; Fri, 7 Jun 2024 12:17:23 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 875B41946D1; Fri, 7 Jun 2024 12:16:19 +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="d0NqXQm8"; dkim=pass (1024-bit key) header.d=paragon-software.com header.i=@paragon-software.com header.b="gjneoprT" 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 57AD1194097; Fri, 7 Jun 2024 12:16:17 +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=1717762578; cv=none; b=n+Fh4fARLG/hrQYW2vCJwdxyO8aI+9Cnr1rRNec4dt4iLddlGs1YEQp12mEakdjjAajwuKNs706p+AHCs7jv/qiNYPaCIgFaYGzKh3+Ovrhj33QT5GVkq4WkP1bBhROFl2eKKdQFapbQyW2O2h/ut/7ZtkCflqbv39e05widMa0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717762578; c=relaxed/simple; bh=IDXHPwZU8zALb1dVj+JDa36NpI0ML5BFBX3jkG325/Q=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=jnZrmYe1GzV1nCK9VCpfAxAHWnezf9XNi4HY7QW27DcpYFYh0VGmycog/lAsCvNB3TXR4ggAiJEbCH3I29LQi1BT3QpmFkI7VZl2Zvv3apSb/z0UlyN/7hSGhsJvQsJt0/SgW0DYMnRcyDRKpC6faJfaN4Kh/vqOG35JydABnYE= 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=d0NqXQm8; dkim=pass (1024-bit key) header.d=paragon-software.com header.i=@paragon-software.com header.b=gjneoprT; 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 relayfre-01.paragon-software.com (unknown [172.30.72.12]) by relayaws-01.paragon-software.com (Postfix) with ESMTPS id AB2B82111; Fri, 7 Jun 2024 12:08:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paragon-software.com; s=mail; t=1717762101; bh=PLpDTAuPwmuChFu88p0R105H1Nq2kjyzVIh/lCRxU/o=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=d0NqXQm8xE9HOFVsrLG3Get/cSsSj8NgwmTSDU/xfWAZdWUQvVkON2RpV7gm3Oq6X JVhJxVhRAc0xL/rrpWQUioDlo8VXCpXMetDn6Mxh3Tg3Xne3AW54o6xQoqoiSpmJf/ 8Q3MErrOEjbPXcbURZpN7laQZsawHyjDJc21JUO8= Received: from dlg2.mail.paragon-software.com (vdlg-exch-02.paragon-software.com [172.30.1.105]) by relayfre-01.paragon-software.com (Postfix) with ESMTPS id 8F170195; Fri, 7 Jun 2024 12:16:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paragon-software.com; s=mail; t=1717762575; bh=PLpDTAuPwmuChFu88p0R105H1Nq2kjyzVIh/lCRxU/o=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=gjneoprT4AtPMhX5ZWsjtz8G53BN+Q83iGi3BygDP76xjPkRZHxhWFzx7lhnGV6b2 OUf6QBh8QupsJ5vJEuDI0etPzGA/JIna0xEtefyJ8UQKzH1jtpJhzhhrnWreXqj6rm lhJ6zftyV5mLv6siZXuRUzCgm/+L30tpvpiFC/uM= Received: from ntfs3vm.paragon-software.com (192.168.211.95) 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; Fri, 7 Jun 2024 15:16:15 +0300 From: Konstantin Komarov To: CC: , , Konstantin Komarov Subject: [PATCH 09/18] fs/ntfs3: Replace inode_trylock with inode_lock Date: Fri, 7 Jun 2024 15:15:39 +0300 Message-ID: <20240607121548.18818-10-almaz.alexandrovich@paragon-software.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240607121548.18818-1-almaz.alexandrovich@paragon-software.com> References: <20240607121548.18818-1-almaz.alexandrovich@paragon-software.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: vdlg-exch-02.paragon-software.com (172.30.1.105) To vdlg-exch-02.paragon-software.com (172.30.1.105) The issue was detected due to xfstest 465 failing. Fixes: 4342306f0f0d5i ("fs/ntfs3: Add file operations and implementation") Signed-off-by: Konstantin Komarov --- fs/ntfs3/file.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/fs/ntfs3/file.c b/fs/ntfs3/file.c index 2f903b6ce157..9ae202901f3c 100644 --- a/fs/ntfs3/file.c +++ b/fs/ntfs3/file.c @@ -299,10 +299,7 @@ static int ntfs_file_mmap(struct file *file, struct vm_area_struct *vma) } if (ni->i_valid < to) { - if (!inode_trylock(inode)) { - err = -EAGAIN; - goto out; - } + inode_lock(inode); err = ntfs_extend_initialized_size(file, ni, ni->i_valid, to); inode_unlock(inode); -- 2.34.1