Received: by 10.192.165.148 with SMTP id m20csp1539067imm; Thu, 3 May 2018 00:47:50 -0700 (PDT) X-Google-Smtp-Source: AB8JxZrSzYkPh3+aALXpJUYTTkAbDxrW3vGGPrwhX7Z6LoE6cIv9Ybo/HPplcwBZfo7hTSl05eYS X-Received: by 10.98.11.3 with SMTP id t3mr22247663pfi.32.1525333670060; Thu, 03 May 2018 00:47:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525333670; cv=none; d=google.com; s=arc-20160816; b=qdbySqFt9qYqMTGRmAuyXkhDOgHe/zDjV5/fDYMq04V6FUgD0GRzwZXLVu98FqNEby d1FzDbJW1LitZCa+OL+aovSCvucVnQmeHLcLPByGQcQ5fyFn92mrletDa7YxJyIiIyaQ I966xYcZkjH8RkVXYqQBGQ+ufk8psi5r1GCXs3VcdstpjxCXCnpqRQv9vWFgCAsUKat5 X90y347X4iRmBSSLZGNAgRKZrQq8KKnL8IyYgjpbdpQtan84TTIiIID2JTbRefjSNcF5 MlGjPLI0Hh9EjSUmrkurypDB/0C1+Sqdzx5gKikuYQBf03R9/0IQfn+9/R9rcXzbMzRl kAOw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from:arc-authentication-results; bh=YHA1Qob5UJYmalMtWZJdNo+A1TLjWLuCryfMHIrpGCw=; b=Vq7reAxfilCth9/LRxre8HQFB87EQZEIx0Itj4uAxzilIgpHqV1iAMEYsQNcXn+ht+ HMP38d0J9YNbGbpR1hjOWR7qcu9RrtIWIxTRSaZ3xC8oMnSwKXcVe/3KaA7AOci0NyC5 oT7h/9gCYSdPJxMJIfJeZtXfajGuH+YG2w9nqdO8eZTNOYdDxTFA3YPkmwLvgFaKRqEq HiVlCiLo6ttgWYdtwzPrnV3S9W5rL4f0F6RyazxLdlzNwmISpc4y7Gyz3I5chZur2+y3 PrzziDb6fyUon3ORaHScmhOfOUd23pvjRsGbaGtqB83dTlVK8HDfmm+MpAqiSYY6cndt ceeA== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s71si2738243pfi.74.2018.05.03.00.47.35; Thu, 03 May 2018 00:47: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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751095AbeECHqK (ORCPT + 99 others); Thu, 3 May 2018 03:46:10 -0400 Received: from szxga05-in.huawei.com ([45.249.212.191]:7222 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750939AbeECHqJ (ORCPT ); Thu, 3 May 2018 03:46:09 -0400 Received: from DGGEMS406-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id DF06FE3D9F00E; Thu, 3 May 2018 15:45:54 +0800 (CST) Received: from huawei.com (10.113.189.234) by DGGEMS406-HUB.china.huawei.com (10.3.19.206) with Microsoft SMTP Server id 14.3.361.1; Thu, 3 May 2018 15:45:49 +0800 From: Yunlong Song To: , , , , CC: , , , , , Subject: [PATCH] f2fs: fix the way to wake up issue_flush thread Date: Thu, 3 May 2018 15:45:43 +0800 Message-ID: <1525333543-106702-1-git-send-email-yunlong.song@huawei.com> X-Mailer: git-send-email 1.8.5.2 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.113.189.234] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit 6f890df0 ("f2fs: fix out-of-order execution in f2fs_issue_flush") uses waitqueue_active to wake up issue_flush thread, but there is no wait entry to wake in this queue, so change it back to use the original fcc->dispatch_list to wake up issue_flush thread. Signed-off-by: Yunlong Song --- fs/f2fs/segment.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c index 503a98a..5aa5ee4e 100644 --- a/fs/f2fs/segment.c +++ b/fs/f2fs/segment.c @@ -612,7 +612,7 @@ int f2fs_issue_flush(struct f2fs_sb_info *sbi, nid_t ino) /* update issue_list before we wake up issue_flush thread */ smp_mb(); - if (waitqueue_active(&fcc->flush_wait_queue)) + if (!fcc->dispatch_list) wake_up(&fcc->flush_wait_queue); if (fcc->f2fs_issue_flush) { -- 1.8.5.2