From patchwork Tue Sep 12 11:08:08 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Satoru Takeuchi X-Patchwork-Id: 9949005 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 5F9B26038F for ; Tue, 12 Sep 2017 11:09:13 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4E7BD28F1E for ; Tue, 12 Sep 2017 11:09:13 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4368F28F18; Tue, 12 Sep 2017 11:09:13 +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.3 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, T_DKIM_INVALID 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 B015728F1B for ; Tue, 12 Sep 2017 11:09:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751392AbdILLIN (ORCPT ); Tue, 12 Sep 2017 07:08:13 -0400 Received: from mail-pf0-f196.google.com ([209.85.192.196]:38282 "EHLO mail-pf0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751311AbdILLIM (ORCPT ); Tue, 12 Sep 2017 07:08:12 -0400 Received: by mail-pf0-f196.google.com with SMTP id q76so6097077pfq.5 for ; Tue, 12 Sep 2017 04:08:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:message-id:from:to:subject:user-agent:mime-version; bh=GzHWexh5aIoWJBsPc/ZYxFnVnAZ8Eaom/PdTLoUNpr8=; b=tGK+ghYvFowMX0WeRJVWwoKSpCM4T662EKZyj0wIPgfhia7XUBwEQZ1178N3sFRmAv fMYk4dx8wjhmNQ/ojb7KJQgj3VQVsPWsI3fIj6/urW1z1miYDBaTxqlUS3OpRQhPcxkt eRXWBeCj7eE8AbSko3QN+q3A3G8sL/7yOA6BFcMcoGxV/t/wVv6qGGMfbGoHvd49J4ij hqd+FASjgR24ipZnecdDXmruFlnyuX3/EiF1pHIsIDWRiq8mgxNskbue9Yf9oayDsQHB XIt1O61uQIeVy+ZfDYR7TaCPFLC2bahizLeQYcz/9o27eFqpno8tt8eU76yxfLzDu1pl QVPA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:message-id:from:to:subject:user-agent :mime-version; bh=GzHWexh5aIoWJBsPc/ZYxFnVnAZ8Eaom/PdTLoUNpr8=; b=GbvzEUWD8XXafbuG8HFKU6v33Ww1p6FVfEL62Ut5I0VqhhQoggOtfVkCKUIorwM63p ysT+qzR9amsJOi2Ca3h76H5VCvHsWN5hF6taZkg/cvlKPBBdyiEv+FtrsGyDUcH2/sfE nctTgwEDQrOLgPEW9zV1BSBOSfZEYcF2KNAKFIP8kb+NEd257RUGBvplu8DrReMYDM+h W5fqmYK9zQIZ6BZAErW+hWd9EkXO+sizziuHdavIIGqyFOia8rY9JIjajx3Ov5c6NqfK nNLsXTvxm9U7MCzn63QQY1Ca+kIGCsQ8NoYT6ic765d7aqiFuBamD7cESyKDu/uJvQn1 WCkg== X-Gm-Message-State: AHPjjUgnjVqOOKOIevYspOiqOxr7jTzBFIu5aRYY0G/pzz4qRR01KxvP ClMg2hrE0JqgY7ZM X-Google-Smtp-Source: ADKCNb7j769NUTla5wdbPasFThke29jM7x1li34WDyqd2awfWlASNICHF7g8JeWUeOJo5iOTmLlKmw== X-Received: by 10.98.141.77 with SMTP id z74mr14640614pfd.179.1505214491109; Tue, 12 Sep 2017 04:08:11 -0700 (PDT) Received: from gopher.gmail.com (58-189-215-38f1.hyg2.eonet.ne.jp. [58.189.215.38]) by smtp.gmail.com with ESMTPSA id q6sm17779252pgp.58.2017.09.12.04.08.09 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 12 Sep 2017 04:08:10 -0700 (PDT) Date: Tue, 12 Sep 2017 20:08:08 +0900 Message-ID: <87o9qgw4x3.wl-satoru.takeuchi@gmail.com> From: Satoru Takeuchi To: linux-btrfs@vger.kernel.org Subject: [PATCH] btrfs: convert all mount option checking code to use btrfs_test_opt User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM/1.14.9 (=?ISO-8859-4?Q?Goj=F2?=) APEL/10.8 EasyPG/1.0.0 Emacs/24.5 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") 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 Signed-off-by: Satoru Takeuchi Reviewed-by: David Sterba --- fs/btrfs/extent-tree.c | 2 +- fs/btrfs/super.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c index e2d7e86..ea9b0d2 100644 --- a/fs/btrfs/extent-tree.c +++ b/fs/btrfs/extent-tree.c @@ -652,7 +652,7 @@ static int cache_block_group(struct btrfs_block_group_cache *cache, cache->cached = BTRFS_CACHE_FAST; spin_unlock(&cache->lock); - if (fs_info->mount_opt & BTRFS_MOUNT_SPACE_CACHE) { + if (btrfs_test_opt(fs_info, SPACE_CACHE)) { mutex_lock(&caching_ctl->mutex); ret = load_free_space_cache(fs_info, cache); diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c index 0b7a1d8..26f0a38 100644 --- a/fs/btrfs/super.c +++ b/fs/btrfs/super.c @@ -292,7 +292,7 @@ void __btrfs_panic(struct btrfs_fs_info *fs_info, const char *function, vaf.va = &args; errstr = btrfs_decode_error(errno); - if (fs_info && (fs_info->mount_opt & BTRFS_MOUNT_PANIC_ON_FATAL_ERROR)) + if (fs_info && (btrfs_test_opt(fs_info, PANIC_ON_FATAL_ERROR))) panic(KERN_CRIT "BTRFS panic (device %s) in %s:%d: %pV (errno=%d %s)\n", s_id, function, line, &vaf, errno, errstr);