public inbox for linux-btrfs@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH misc-next] btrfs: fix compilation error in btree_write_cache_pages()
@ 2020-02-24 20:22 Johannes Thumshirn
  2020-02-24 21:30 ` Marcos Paulo de Souza
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Johannes Thumshirn @ 2020-02-24 20:22 UTC (permalink / raw)
  To: David Sterba
  Cc: Qu Wenruo, linux-btrfs @ vger . kernel . org, Johannes Thumshirn

CC [M]  fs/btrfs/extent_io.o
fs/btrfs/extent_io.c: In function ‘btree_write_cache_pages’:
fs/btrfs/extent_io.c:3959:34: error: ‘tree’ undeclared (first use in this function); did you mean ‘true’?
 3959 |  struct btrfs_fs_info *fs_info = tree->fs_info;
      |                                  ^~~~
      |                                  true
fs/btrfs/extent_io.c:3959:34: note: each undeclared identifier is reported only once for each function it appears in
make[2]: *** [scripts/Makefile.build:268: fs/btrfs/extent_io.o] Error 1
make[1]: *** [scripts/Makefile.build:505: fs/btrfs] Error 2
make: *** [Makefile:1681: fs] Error 2

Fixes: 75c39607eb0a ("btrfs: Don't submit any btree write bio if the fs has errors")
Signed-off-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
---
 fs/btrfs/extent_io.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c
index 903a85d8fbe3..837262d54e28 100644
--- a/fs/btrfs/extent_io.c
+++ b/fs/btrfs/extent_io.c
@@ -3956,7 +3956,7 @@ int btree_write_cache_pages(struct address_space *mapping,
 		.extent_locked = 0,
 		.sync_io = wbc->sync_mode == WB_SYNC_ALL,
 	};
-	struct btrfs_fs_info *fs_info = tree->fs_info;
+	struct btrfs_fs_info *fs_info = BTRFS_I(mapping->host)->root->fs_info;
 	int ret = 0;
 	int done = 0;
 	int nr_to_write_done = 0;
-- 
2.24.1


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

end of thread, other threads:[~2020-02-24 23:54 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-02-24 20:22 [PATCH misc-next] btrfs: fix compilation error in btree_write_cache_pages() Johannes Thumshirn
2020-02-24 21:30 ` Marcos Paulo de Souza
2020-02-24 23:28 ` David Sterba
2020-02-24 23:54 ` Qu Wenruo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox