linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] btrfs: convert all mount option checking code to use btrfs_test_opt
@ 2017-09-12 11:08 Satoru Takeuchi
  2017-09-12 12:16 ` David Sterba
  0 siblings, 1 reply; 2+ messages in thread
From: Satoru Takeuchi @ 2017-09-12 11:08 UTC (permalink / raw)
  To: linux-btrfs

Signed-off-by: Satoru Takeuchi <satoru.takeuchi@gmail.com>
---
 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);
 
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] btrfs: convert all mount option checking code to use btrfs_test_opt
  2017-09-12 11:08 [PATCH] btrfs: convert all mount option checking code to use btrfs_test_opt Satoru Takeuchi
@ 2017-09-12 12:16 ` David Sterba
  0 siblings, 0 replies; 2+ messages in thread
From: David Sterba @ 2017-09-12 12:16 UTC (permalink / raw)
  To: Satoru Takeuchi; +Cc: linux-btrfs

On Tue, Sep 12, 2017 at 08:08:08PM +0900, Satoru Takeuchi wrote:
> Signed-off-by: Satoru Takeuchi <satoru.takeuchi@gmail.com>

Reviewed-by: David Sterba <dsterba@suse.com>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-09-12 12:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-09-12 11:08 [PATCH] btrfs: convert all mount option checking code to use btrfs_test_opt Satoru Takeuchi
2017-09-12 12:16 ` David Sterba

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).