Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp1870594ybb; Thu, 9 Apr 2020 10:31:50 -0700 (PDT) X-Google-Smtp-Source: APiQypJCB0c4PNKsvRAR3c2GEvd948764+G1sCge0pH5cY7C+pmFJ//BBIPalJEWlsnXcR2sGaxe X-Received: by 2002:a37:aa45:: with SMTP id t66mr948096qke.75.1586453510266; Thu, 09 Apr 2020 10:31:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586453510; cv=none; d=google.com; s=arc-20160816; b=cqP9P2t3Dr450y8MbPB531/NFIhK8+cg4KxLmobgMPAqOAo/avQ5BPhwGVCBXoz1cg 7D3Kh7IrdcjTVUZLbGooOlphPHDJO2itjj4foQQDc/dvZ8GzwzsNw671MHdilbdQtASu 7pf9aviRps87okVP0vmj2ipgyjVINU8JgB/Y3C1faPXSwixS2n5gmvkiLPdiGpw8A7WC JgXZo5XtX1t8oGlGgMx1LM7maE32Wj3jeGltz+7t3FapCbVAfGBuFXmNSzR/YJWBLslp kh5JY8UQ1XOMYJtxdQrRmrvvQ9W8kCn7BwCeRAKsuYt0uFozgeZGOpJ4rvmLqijsbxqn L4vQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=kKej1gEDNdHQNHbmgEdxfqi0b0lQOkCS/Yk2GbnJpz0=; b=rzzVzNa/UNDfsRLppFGCG4CiS25Xhp9p01Phul/oKa0OT/S7jEcjIKaE7Hkp1DWjjx oRtRbqxFvLd+RGQ7JiJB7nMDedWmpFo3rZJR0XKIv5L7qTrVj/9Ri5b8/CIFccqUHMig RCgHEcFz34s7xbrI0ZBA3l/lljnw77HaoKzBJcoDNSOtjuIipMiijoeRc0oYdqSNqlJo E3dOjxRhdewtm2ggOIkcPkrGYbp9WGTJi35Vq3j6RTdEO9Tu8gw4hSzAy6F4DVzA/7h3 m6i1h/ck2UY02M5u/K4HlcOnP8JDlCuk6E6qrJXgaT6+yCC3jkasgVC4WURhOJ2PArjG 0IHg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=W9ng6891; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b13si5639402qtq.137.2020.04.09.10.31.34; Thu, 09 Apr 2020 10:31:50 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=W9ng6891; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726715AbgDIRa6 (ORCPT + 99 others); Thu, 9 Apr 2020 13:30:58 -0400 Received: from mail.kernel.org ([198.145.29.99]:55656 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726622AbgDIRa5 (ORCPT ); Thu, 9 Apr 2020 13:30:57 -0400 Received: from localhost (unknown [104.132.1.66]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id D81E720753; Thu, 9 Apr 2020 17:30:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1586453458; bh=6bcDf97ASpJTxAYOqpWx0e2gOIt5ERptaNd2MAMPc4I=; h=From:To:Cc:Subject:Date:From; b=W9ng68913sTnRs3JV8IUWA2y7YIqCEESBXw8Fzj6WYmIshTp0myEQVRELhV3IEHIT m1Wl8ZC4cMOL6xMjdNoLXUyeDdHWtw3lhrjyfG/8zUQlPQSFqaSQWNRqnPgybJ1Zzv C3Q3BHx1Ox5Ubs11vi2IsgysrtsZmWCpsJENmY00= From: Jaegeuk Kim To: linux-kernel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, kernel-team@android.com Cc: Jaegeuk Kim Subject: [PATCH] f2fs: fix quota_sync failure due to f2fs_lock_op Date: Thu, 9 Apr 2020 10:30:56 -0700 Message-Id: <20200409173056.229855-1-jaegeuk@kernel.org> X-Mailer: git-send-email 2.26.0.110.g2183baf09c-goog MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org f2fs_quota_sync() uses f2fs_lock_op() before flushing dirty pages, but f2fs_write_data_page() returns EAGAIN. Likewise dentry blocks, we can just bypass getting the lock, since quota blocks are also maintained by checkpoint. Signed-off-by: Jaegeuk Kim --- fs/f2fs/data.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c index 358c5f0bd6346..1139d8cf4b8d1 100644 --- a/fs/f2fs/data.c +++ b/fs/f2fs/data.c @@ -2707,8 +2707,8 @@ int f2fs_write_single_data_page(struct page *page, int *submitted, f2fs_available_free_memory(sbi, BASE_CHECK)))) goto redirty_out; - /* Dentry blocks are controlled by checkpoint */ - if (S_ISDIR(inode->i_mode)) { + /* Dentry/quota blocks are controlled by checkpoint */ + if (S_ISDIR(inode->i_mode) || IS_NOQUOTA(inode)) { fio.need_lock = LOCK_DONE; err = f2fs_do_write_data_page(&fio); goto done; -- 2.26.0.110.g2183baf09c-goog