Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp1853835pxa; Thu, 6 Aug 2020 18:25:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxg6HxHr4ro7HIlTHcUmQ6FBqE2KGDBLj2EvJI3LXHJKe52JYj8IZhRqURHl2QMZ7jbjlSC X-Received: by 2002:a17:906:1cd4:: with SMTP id i20mr6937296ejh.480.1596763510214; Thu, 06 Aug 2020 18:25:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596763510; cv=none; d=google.com; s=arc-20160816; b=dM0iLK/tM0Z7grKvKj+dA2mFy3ITsOEbHfCJDxqKdCCTWOdYeOK91bG5ng76K83/X+ Wsz6IwVZNWMlElh7VInRjwc/zgfgNXBgCE3KOpww8WcXddvcLJKYVANyJkLEyVDf8qXr GME1IWmkajEJQ3leDCXF59SBQSNn6MEpDzyC2UVbDJwra86LtO1CtwuP8eLRk1Z8U4TY CrlSp9+1CqEDPy9N56EdO9wox625vuqtKJi4Njb7AdrUFi6YJpv4JBHSD9so3YRAaXQM Fnef0jgYvyJn66GPoquBEZ+YHHyxb8EsX36BLfzEOP95kBB9BLZTemuvy9SFmbD0kWDM ztmg== 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; bh=fMmMsRAiYbegQ4YyFSLfeMf+JYYVPiq01gXxyd8u6kU=; b=b/iv2Y+Orhfu6mXCTkewp4xJy3Rt8Xr20JJyRkoXos1ta0nn32UWJqmb/Ihs6WwdWL zQF+Qt1Rhamq1rpiUbXs7SQOEP8/N5XIy2oEj3CjAKcCluseu3NnCHijCzEkF72MMWxd ydZdIbkuYUPPw7iBzr/s9fCqQaEpLnsT+BInjmiMS6J7lHTBtWdnq3RaHkC5kLl47RTK 8P6Nb2Qnk6XI9dUdd9Ju0Ak/sH5YOnh6t6nB0370tsf/cb7luVzz51S42dZN036x62or eW9nkBpAlLTvNfkvr5pSL/2iYnQitC7ebwZhpk36auV/Pr/BfzbDBPjfDVRsG4OaSr/Y S+lQ== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id lr26si4631881ejb.47.2020.08.06.18.24.47; Thu, 06 Aug 2020 18:25:10 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726360AbgHGBX3 (ORCPT + 99 others); Thu, 6 Aug 2020 21:23:29 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:9350 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726276AbgHGBX0 (ORCPT ); Thu, 6 Aug 2020 21:23:26 -0400 Received: from DGGEMS411-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id 231C2A365779A84C8704; Fri, 7 Aug 2020 09:23:24 +0800 (CST) Received: from szvp000203569.huawei.com (10.120.216.130) by DGGEMS411-HUB.china.huawei.com (10.3.19.211) with Microsoft SMTP Server id 14.3.487.0; Fri, 7 Aug 2020 09:23:13 +0800 From: Chao Yu To: CC: , , , Chao Yu Subject: [PATCH] f2fs: compress: remove unneeded code Date: Fri, 7 Aug 2020 09:23:10 +0800 Message-ID: <20200807012310.112639-1-yuchao0@huawei.com> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.120.216.130] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org - f2fs_write_multi_pages - f2fs_compress_pages - init_compress_ctx - compress_pages - destroy_compress_ctx --- 1 - f2fs_write_compressed_pages - destroy_compress_ctx --- 2 destroy_compress_ctx() in f2fs_write_multi_pages() is redundant, remove it. Signed-off-by: Chao Yu --- fs/f2fs/compress.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/fs/f2fs/compress.c b/fs/f2fs/compress.c index 6e7db450006c..3bb112e91cf6 100644 --- a/fs/f2fs/compress.c +++ b/fs/f2fs/compress.c @@ -1388,9 +1388,6 @@ int f2fs_write_multi_pages(struct compress_ctx *cc, struct writeback_control *wbc, enum iostat_type io_type) { - struct f2fs_inode_info *fi = F2FS_I(cc->inode); - const struct f2fs_compress_ops *cops = - f2fs_cops[fi->i_compress_algorithm]; int err; *submitted = 0; @@ -1405,7 +1402,6 @@ int f2fs_write_multi_pages(struct compress_ctx *cc, err = f2fs_write_compressed_pages(cc, submitted, wbc, io_type); - cops->destroy_compress_ctx(cc); kfree(cc->cpages); cc->cpages = NULL; if (!err) -- 2.26.2