From patchwork Mon Jan 9 14:39:03 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michal Hocko X-Patchwork-Id: 9504947 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 53B2C60757 for ; Mon, 9 Jan 2017 14:42:03 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 49046284E5 for ; Mon, 9 Jan 2017 14:42:03 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3D26128507; Mon, 9 Jan 2017 14:42:03 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.4 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CBDBA284E5 for ; Mon, 9 Jan 2017 14:42:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S940143AbdAIOjj (ORCPT ); Mon, 9 Jan 2017 09:39:39 -0500 Received: from mail-wm0-f68.google.com ([74.125.82.68]:34129 "EHLO mail-wm0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S940086AbdAIOjM (ORCPT ); Mon, 9 Jan 2017 09:39:12 -0500 Received: by mail-wm0-f68.google.com with SMTP id c85so22499086wmi.1; Mon, 09 Jan 2017 06:39:10 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=HeM1tcr+esTYfGV6K17xMSdA7LZLNZz4IQRiJlmx/Pk=; b=NCF5mqBLBSTJ2ToP308IeUYY7AJjY12XZu8+otNBSofPuFOlSilCfBic3XO/4O5ryg 4LniJYvFCLFG2GklHMKZ+WDGT+I4948QtRcxtKSbgnh4eBki3ajFTZ6XeNY0C+5bsYwu Cp6lhnBSDMMrJqm0CYs06hE9aqQ6Z4sod28f6rhiwmiZAP8iXQenfrLjpwvNfkGkclGz sQKIAUdA2gmMGjyvSfysrGJ0N4pCvt/GICvI0eY+dlpFnoyrGCaRcfYAxMIZtcwSChC5 7HzzsBs+HAmUsZ7bFIa3OqWwUcLXeE0bi1Pn3prH8dmZD9yIFJ2EC0R3y9JUIzvORcG4 HjSw== X-Gm-Message-State: AIkVDXK83TyA6V3X1eAPVRKxo7UqTn7AvQpj8rL8j+EhaluISyP4oPRyB22PguP2BBu3/g== X-Received: by 10.28.145.3 with SMTP id t3mr1301704wmd.47.1483972749599; Mon, 09 Jan 2017 06:39:09 -0800 (PST) Received: from tiehlicka.suse.cz ([213.151.95.130]) by smtp.gmail.com with ESMTPSA id jm6sm123881830wjb.27.2017.01.09.06.39.08 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 09 Jan 2017 06:39:09 -0800 (PST) From: Michal Hocko To: Chris Mason , David Sterba , Josef Bacik Cc: linux-btrfs@vger.kernel.org, linux-kernel@vger.kernel.org, Michal Hocko Subject: [PATCH 2/2] btrfs: drop gfp mask tweaking in try_release_extent_state Date: Mon, 9 Jan 2017 15:39:03 +0100 Message-Id: <20170109143903.32280-2-mhocko@kernel.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170109143903.32280-1-mhocko@kernel.org> References: <20170109143903.32280-1-mhocko@kernel.org> Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Michal Hocko try_release_extent_state reduces the gfp mask to GFP_NOFS if it is compatible. This is true for GFP_KERNEL as well. There is no real reason to do that though. There is no new lock taken down the the only consumer of the gfp mask which is try_release_extent_state clear_extent_bit __clear_extent_bit alloc_extent_state So this seems just unnecessary and confusing. Signed-off-by: Michal Hocko Reviewed-by: David Sterba --- fs/btrfs/extent_io.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c index f6ae94a4acad..8158930c8d4a 100644 --- a/fs/btrfs/extent_io.c +++ b/fs/btrfs/extent_io.c @@ -4326,8 +4326,6 @@ static int try_release_extent_state(struct extent_map_tree *map, EXTENT_IOBITS, 0, NULL)) ret = 0; else { - if ((mask & GFP_NOFS) == GFP_NOFS) - mask = GFP_NOFS; /* * at this point we can safely clear everything except the * locked bit and the nodatasum bit