File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed
drivers/md/persistent-data Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -917,23 +917,27 @@ static int load_ablock(struct dm_array_cursor *c)
917
917
if (c -> block )
918
918
unlock_ablock (c -> info , c -> block );
919
919
920
- c -> block = NULL ;
921
- c -> ab = NULL ;
922
920
c -> index = 0 ;
923
921
924
922
r = dm_btree_cursor_get_value (& c -> cursor , & key , & value_le );
925
923
if (r ) {
926
924
DMERR ("dm_btree_cursor_get_value failed" );
927
- dm_btree_cursor_end ( & c -> cursor ) ;
925
+ goto out ;
928
926
929
927
} else {
930
928
r = get_ablock (c -> info , le64_to_cpu (value_le ), & c -> block , & c -> ab );
931
929
if (r ) {
932
930
DMERR ("get_ablock failed" );
933
- dm_btree_cursor_end ( & c -> cursor ) ;
931
+ goto out ;
934
932
}
935
933
}
936
934
935
+ return 0 ;
936
+
937
+ out :
938
+ dm_btree_cursor_end (& c -> cursor );
939
+ c -> block = NULL ;
940
+ c -> ab = NULL ;
937
941
return r ;
938
942
}
939
943
You can’t perform that action at this time.
0 commit comments