Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp1691558pxb; Thu, 16 Sep 2021 13:06:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx3EGc9sRPKCs3uv/63Hk58Y0DZjrY6BVNEsdiHuaPmVNlq/j/Y34u04Kaltw4BvphriR2I X-Received: by 2002:a17:906:b00c:: with SMTP id v12mr8050094ejy.222.1631822786279; Thu, 16 Sep 2021 13:06:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631822786; cv=none; d=google.com; s=arc-20160816; b=eeZDz4JDhTVtl0c7CjJ3lboT0ybQAJRvWcFB7/Fo6bMT+g81fpMctbCeAOqwmizK1R zMhwOpvwncx7dpUANTfVwu0gKRWMntjcBTeIBGxqnUCqOWv0FyBZ76P8jd/S+hLd7WVF XWB+wW6IojJKu03xEka/hcOjsvl/IQ003pvf52616aTH+KcdyAMz3MfEiqmfPtLIbDco 3OsYwRhBgFxX2H3zvBdChA91Drm6GpZPjjSoFy4n+E0QAkXMQ8ls0/Z4B1A9/RT9yy+f c4+RPQgFpse3rejBHxQnZcei63HGCgO94PrAJUM1hNEwOonctLsbQGEAPCDO5sx5TuMR 2+tA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=uGnNTeHLRODwkTmV4LpXxbqbA6R56XNOokCyX/xNPy4=; b=aidf+slgpjwkey0FRDSgVI3GIa7SiplXuplHG6FEe3cNQyiXDdS6jEjpV3BKv4hB1a ZRAF0wFIM6Vv/KQmTSYGcsVDLf2NreZQ/7DSET9OC+RVDj2di2zMQ+RF7xB5rEWJ4RKj V1iMFWllmypUfpECjT+HzpQo6Kku0iBeVRzEFlu7O42HzV+/KJ8KdHfVpYgFhniPkREA 23VKonvyI5n7Dg6siGVPok39A7gCy3R9+Ccvhbza2ipTSJI8SfQcNVUey6pir/Yiqhjf VV5V407txS3sa107Tkd6+4y77+/tu9EJWPyj2iXiemWw+PR934PNtwRpLrQgHBxNgGyI pLcQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=RCxMxY7d; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s12si4435252ejc.488.2021.09.16.13.05.45; Thu, 16 Sep 2021 13:06:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=RCxMxY7d; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235650AbhIPQQP (ORCPT + 99 others); Thu, 16 Sep 2021 12:16:15 -0400 Received: from mail.kernel.org ([198.145.29.99]:48608 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232046AbhIPQJS (ORCPT ); Thu, 16 Sep 2021 12:09:18 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 8D39B611F2; Thu, 16 Sep 2021 16:07:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1631808472; bh=N5UIdbKmQC2GylmvLG/T0K8kDhTrLolvyGZLcHvmQ48=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=RCxMxY7dZEXTOZUuX0RsLAUysdrfpWooYbiyIefvhbaBwOpFOgvX/uBBBAMz9ZVpV s/vT3GuDZwChYNo3bIP9DKHQdDuswsGBLZ4aoUIIViHvGS8/5QEpFRLC8FC8X6TNC9 6LCua4bTZ23vaFjNLuvBD2quSOPRfPVE9/i/0n7Y= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Chao Yu , Jaegeuk Kim , Sasha Levin Subject: [PATCH 5.10 102/306] f2fs: fix to account missing .skipped_gc_rwsem Date: Thu, 16 Sep 2021 17:57:27 +0200 Message-Id: <20210916155757.548657520@linuxfoundation.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210916155753.903069397@linuxfoundation.org> References: <20210916155753.903069397@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Chao Yu [ Upstream commit ad126ebddecbf696e0cf214ff56c7b170fa9f0f7 ] There is a missing place we forgot to account .skipped_gc_rwsem, fix it. Fixes: 6f8d4455060d ("f2fs: avoid fi->i_gc_rwsem[WRITE] lock in f2fs_gc") Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim Signed-off-by: Sasha Levin --- fs/f2fs/gc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/fs/f2fs/gc.c b/fs/f2fs/gc.c index e02affb5c0e7..72f227f6ebad 100644 --- a/fs/f2fs/gc.c +++ b/fs/f2fs/gc.c @@ -1477,8 +1477,10 @@ static int gc_data_segment(struct f2fs_sb_info *sbi, struct f2fs_summary *sum, int err; if (S_ISREG(inode->i_mode)) { - if (!down_write_trylock(&fi->i_gc_rwsem[READ])) + if (!down_write_trylock(&fi->i_gc_rwsem[READ])) { + sbi->skipped_gc_rwsem++; continue; + } if (!down_write_trylock( &fi->i_gc_rwsem[WRITE])) { sbi->skipped_gc_rwsem++; -- 2.30.2