path: root/extent_io.c
diff options
authorChris Mason <>2012-02-05 16:11:48 -0500
committerChris Mason <>2012-02-05 16:11:48 -0500
commite7580bb29644128d19cfe70a16df713bdcc58a43 (patch)
tree25889d9d37f26e4c796c2955032a2dfbe645e47d /extent_io.c
parent6cd813b6fc18ba75edfcfad5857d27f0265c2c28 (diff)
Add open_ctree_fs_info for partial FS opens
fsck needs to be able to open a damaged FS, which means open_ctree needs to be able to return a damaged FS. This adds a new open_ctree_fs_info which can be used to open any and all roots that are valid. btrfs-debug-tree is changed to use it. Signed-off-by: Chris Mason <>
Diffstat (limited to 'extent_io.c')
1 files changed, 3 insertions, 0 deletions
diff --git a/extent_io.c b/extent_io.c
index 973e9181..9990338b 100644
--- a/extent_io.c
+++ b/extent_io.c
@@ -706,6 +706,9 @@ int clear_extent_buffer_uptodate(struct extent_io_tree *tree,
int extent_buffer_uptodate(struct extent_buffer *eb)
+ if (!eb)
+ return 0;
if (eb->flags & EXTENT_UPTODATE)
return 1;
return 0;