diff options
author | David Sterba <dsterba@suse.com> | 2017-02-17 16:24:29 +0100 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2017-02-28 14:29:24 +0100 |
commit | 20a7db8ab3f2057a518448b1728d504ffadef65e (patch) | |
tree | 09d4f1e8acb66b0f935306cbee04b572824df95c /fs/btrfs/inode.c | |
parent | btrfs: drop checks for mandatory extent_io_ops callbacks (diff) | |
download | linux-20a7db8ab3f2057a518448b1728d504ffadef65e.tar.xz linux-20a7db8ab3f2057a518448b1728d504ffadef65e.zip |
btrfs: add dummy callback for readpage_io_failed and drop checks
Make extent_io_ops::readpage_io_failed_hook callback mandatory and
define a dummy function for btrfs_extent_io_ops. As the failed IO
callback is not performance critical, the branch vs extra trade off does
not hurt.
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to '')
-rw-r--r-- | fs/btrfs/inode.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index 3b327c8cfb16..ca1995cfd8e9 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@ -10509,6 +10509,12 @@ out_inode: } +__attribute__((const)) +static int dummy_readpage_io_failed_hook(struct page *page, int failed_mirror) +{ + return 0; +} + static const struct inode_operations btrfs_dir_inode_operations = { .getattr = btrfs_getattr, .lookup = btrfs_lookup, @@ -10551,6 +10557,7 @@ static const struct extent_io_ops btrfs_extent_io_ops = { .submit_bio_hook = btrfs_submit_bio_hook, .readpage_end_io_hook = btrfs_readpage_end_io_hook, .merge_bio_hook = btrfs_merge_bio_hook, + .readpage_io_failed_hook = dummy_readpage_io_failed_hook, /* optional callbacks */ .fill_delalloc = run_delalloc_range, |