]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - fs/btrfs/ctree.c
Btrfs: return value of btrfs_read_buffer is checked correctly
[karo-tx-linux.git] / fs / btrfs / ctree.c
index 26847999c64923ba346b7d55cd51570f32fb2d59..99fcad631a216307579a209398e24fed59a3300f 100644 (file)
@@ -739,7 +739,11 @@ int btrfs_realloc_node(struct btrfs_trans_handle *trans,
                                if (!cur)
                                        return -EIO;
                        } else if (!uptodate) {
-                               btrfs_read_buffer(cur, gen);
+                               err = btrfs_read_buffer(cur, gen);
+                               if (err) {
+                                       free_extent_buffer(cur);
+                                       return err;
+                               }
                        }
                }
                if (search_start == 0)