summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/extent-io-tree.h
diff options
context:
space:
mode:
authorNikolay Borisov <nborisov@suse.com>2020-07-02 14:23:29 +0200
committerDavid Sterba <dsterba@suse.com>2020-07-27 12:55:39 +0200
commit3526302f26162ae738926d44eb39e2e0780b11bc (patch)
treea64f18866e8b3a0f25a4559d89c96b102721fb79 /fs/btrfs/extent-io-tree.h
parentbtrfs: make get_state_failrec return failrec directly (diff)
downloadlinux-3526302f26162ae738926d44eb39e2e0780b11bc.tar.xz
linux-3526302f26162ae738926d44eb39e2e0780b11bc.zip
btrfs: streamline btrfs_get_io_failure_record logic
Make the function directly return a pointer to a failure record and adjust callers to handle it. Also refactor the logic inside so that the case which allocates the failure record for the first time is not handled in an 'if' arm, saving us a level of indentation. Finally make the function static as it's not used outside of extent_io.c . Reviewed-by: Josef Bacik <josef@toxicpanda.com> Signed-off-by: Nikolay Borisov <nborisov@suse.com> Reviewed-by: David Sterba <dsterba@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/extent-io-tree.h')
-rw-r--r--fs/btrfs/extent-io-tree.h2
1 files changed, 0 insertions, 2 deletions
diff --git a/fs/btrfs/extent-io-tree.h b/fs/btrfs/extent-io-tree.h
index b6db2b1f9b06..f39d47a2d01a 100644
--- a/fs/btrfs/extent-io-tree.h
+++ b/fs/btrfs/extent-io-tree.h
@@ -238,8 +238,6 @@ int set_state_failrec(struct extent_io_tree *tree, u64 start,
struct io_failure_record *failrec);
void btrfs_free_io_failure_record(struct btrfs_inode *inode, u64 start,
u64 end);
-int btrfs_get_io_failure_record(struct inode *inode, u64 start, u64 end,
- struct io_failure_record **failrec_ret);
int free_io_failure(struct extent_io_tree *failure_tree,
struct extent_io_tree *io_tree,
struct io_failure_record *rec);