Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp1911349pxb; Thu, 16 Sep 2021 20:01:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwkFa6KNJ8eLkyDrxuTP7DlX91lQkxxs6Z7XZLGLuuU3z9v+sfWJcuyA4GtbiPNb7vpIeXE X-Received: by 2002:a92:d14e:: with SMTP id t14mr6323917ilg.218.1631847681370; Thu, 16 Sep 2021 20:01:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631847681; cv=none; d=google.com; s=arc-20160816; b=a9tFWv6TvOG54vUrgGFHc4+kspS+11Dpl6kHzetkaTOMb9LpExJWxpmvDCCUP/HiVJ jWywuFV4mFnPV6Ogo527aoW2upoN3Wj8z2GTkZMIvKCOZIVlGBu+63ISWZxC+ktZ/kJy 6YmctyFl56QyHbKHBNU7bYarjg+C6ZLSUI6tAtNjtEs9r3xM6gyZE7s4DIRPpB+mcbuJ 0Q/E2CGjFWVPALanuU085Wm+/d00z+gbXmEOEMtvZs8wQR6VzXbtiZZovml7I2vbcO6l 5FgeLMRf9JftUkaIB5+wpyMkczCMx475meZK9VPH423mDpSlVvx0AEB+NkcSV0IZ5uon 2s3Q== 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=S5BXlPzDa+t9ScM7BFnuKvM26acbFS/P57sEeG2eFeo=; b=X1vPS4Fv6MqVoERI2V0Pm81wHrSiOg5vQ+x520NFo9HM3OMORrRqucBVNW+16CBXqs IpFxsgPz57HJyfR4shfRQLEbK2ICmuB6/Hp0PB6lPw4q9/79KdxZdndi52EKj/TWJmOm /SwH98zouDBvH/eAo8ekUjuhSJQ0kaV/wph7ilSLSWhbYy0ine9L47tfTNI3aMoXDFDt QSh3TXl2/95ArgOWlerIGp3Q2s9ld72Q6m57wCFrH2C7sGAz59jAkkLmVttqjqHaKNew x6KDPYyc3FCSeFJiAnEERxfml09lRUS24+fUPKfEmEnk69ojfQvsbQe01cwq7NYnIBHY EZ7g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=AAEh5+n0; 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 p10si5361931ilo.160.2021.09.16.20.01.09; Thu, 16 Sep 2021 20:01:21 -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=AAEh5+n0; 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 S1347891AbhIPR1t (ORCPT + 99 others); Thu, 16 Sep 2021 13:27:49 -0400 Received: from mail.kernel.org ([198.145.29.99]:43520 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1351154AbhIPRSA (ORCPT ); Thu, 16 Sep 2021 13:18:00 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 1902D61A0B; Thu, 16 Sep 2021 16:40:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1631810460; bh=KtnG62f5Ux0LFIE8Iv0eocACMITqISmfOk3pbxWLlt0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=AAEh5+n0BLKjHdRrKdCZozZ7VUZm2jwLfmvS9edpcEUhYuKtdK/bGbSnNcLvhK9mB uKvTlL/8NNMckcNYUsqf0WKnVDN/PkgA5J/lt7JuayLU3An8TbPzStqG9VMlWLQeh6 mgxdAtjfyWun9lHZ4hduaAfteui0ASCZ5bekN0lU= 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.14 149/432] f2fs: fix to account missing .skipped_gc_rwsem Date: Thu, 16 Sep 2021 17:58:18 +0200 Message-Id: <20210916155815.801480033@linuxfoundation.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210916155810.813340753@linuxfoundation.org> References: <20210916155810.813340753@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 0e42ee5f7770..70234a7040c8 100644 --- a/fs/f2fs/gc.c +++ b/fs/f2fs/gc.c @@ -1497,8 +1497,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