Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752409AbdGFLFw (ORCPT ); Thu, 6 Jul 2017 07:05:52 -0400 Received: from szxga03-in.huawei.com ([45.249.212.189]:8877 "EHLO szxga03-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751034AbdGFLFu (ORCPT ); Thu, 6 Jul 2017 07:05:50 -0400 From: Yunlong Song To: , , , , CC: , , , , Subject: [PATCH] f2fs: no need to create issue_discard_thread if it exists Date: Thu, 6 Jul 2017 19:05:34 +0800 Message-ID: <1499339134-104480-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.107.193.250] X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A020206.595E198C.00EC,ss=1,re=0.000,recu=0.000,reip=0.000,cl=1,cld=1,fgs=0, ip=0.0.0.0, so=2014-11-16 11:51:01, dmn=2013-03-21 17:37:32 X-Mirapoint-Loop-Id: 892f826de78ff01d620ca61ed0778268 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 481 Lines: 20 Signed-off-by: Yunlong Song --- fs/f2fs/segment.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c index 4c246e3..b48d004 100644 --- a/fs/f2fs/segment.c +++ b/fs/f2fs/segment.c @@ -1417,6 +1417,8 @@ static int create_discard_cmd_control(struct f2fs_sb_info *sbi) if (SM_I(sbi)->dcc_info) { dcc = SM_I(sbi)->dcc_info; + if (dcc->f2fs_issue_discard) + return err; goto init_thread; } -- 1.8.5.2