Received: by 2002:a05:6520:4d:b0:139:a872:a4c9 with SMTP id i13csp2565496lkm; Mon, 20 Sep 2021 18:51:47 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzRif4NEs0LoKUKkwCCamXPCnQaL9E2I8+Y4Fn/gdfahCpvftBy7krBPOVgpAOBnEOeDEJh X-Received: by 2002:a5d:9319:: with SMTP id l25mr21293495ion.208.1632188996236; Mon, 20 Sep 2021 18:49:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632188996; cv=none; d=google.com; s=arc-20160816; b=w4qqaFPpoPNezGL4fMZFCGSXzdippG8KxaGJLDGrvyPoRgQeIqwI7SHGbqBHU/2RQw yL7E1MrnvwDEQmG/Sta4Qg/iLYcJQAWam2p9z/7bbopxYnqXZdMd1DfGhRyEQC/E9/HB VhV2xt3NxPh36DEpqiu+eS5UulP6tLvAtwNKNQ+GgOdjTdjzHNU5bDImJaYonnea+PHT uMxUC3KvWTr3LwAnQOcmPCGeKAfR2R4Y89X2xoWOB2omOxuEXuBF+npidv4D2uMb2EPg qv3cDHQh9MXhsspYJCc3TRFWTCGjGjjl77DN1arsKa+Grd9sDnVLpb+Z2jwk9bAIlaHt MwQA== 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=9CP5ve2MxKab8QsNzLw0KE4tZQzc49gIETY01rafm5E=; b=fpyPH856hnGMEFhhi+1yqGLl74f1iYH60rw6N8c9qORLQs00X+1Xeyu5S9BoWUJ22V 8ueDw8i4Vt3MUhpDGrtUWNB5XG9QB2xalPAPQdHsCrzkhfEYT8Z4sPA6ZQ9ykxc66xor ZgWJe/rGllpJud3tnsVBUNwVCymGQxII3oNGhFkW1jUxUGbsD/uGpcyo9XYtrS7At9Zn xiHaBJjc5dCJPX6ENIPbdobd62/OsDc0yUhoA0V4D1sIjHvihCT0/X3MBxH9ofhHm9Em 8//OnSsbhpD05dloUyuiNXi6A1aPuk6HBk71CYZos7i4JzRa/LTEp4SvtOdmDdwYhKPv Ny8A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=STAiH2Fv; 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 b14si396048ilj.16.2021.09.20.18.49.45; Mon, 20 Sep 2021 18:49:56 -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=STAiH2Fv; 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 S1345001AbhITRsm (ORCPT + 99 others); Mon, 20 Sep 2021 13:48:42 -0400 Received: from mail.kernel.org ([198.145.29.99]:50060 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1353439AbhITRql (ORCPT ); Mon, 20 Sep 2021 13:46:41 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 4C73D617E4; Mon, 20 Sep 2021 17:10:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1632157826; bh=QzJowpeGNOD9B4G4xffMufBhOT3bcEaTQbKzuxPDt3A=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=STAiH2FvEeQWWv8X3OwZuxkn8tdghnbBvL4+553pKHjp8VsajsGctVqP1W4qnZyme OHnDpmJ/sSk1EE9eeqsuokArjqKedSPx5QTF+m96A0cGU5Np1eq5t2gX5oDkGgn4dn ZGWpC0tkGQVWH2NSp+81R13PZ4wIzODizZTxJu28= 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 4.19 168/293] f2fs: fix to account missing .skipped_gc_rwsem Date: Mon, 20 Sep 2021 18:42:10 +0200 Message-Id: <20210920163939.038239322@linuxfoundation.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210920163933.258815435@linuxfoundation.org> References: <20210920163933.258815435@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 700c39ec99f5..38299ccfdf6e 100644 --- a/fs/f2fs/gc.c +++ b/fs/f2fs/gc.c @@ -998,8 +998,10 @@ static void gc_data_segment(struct f2fs_sb_info *sbi, struct f2fs_summary *sum, bool locked = false; 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