summaryrefslogtreecommitdiff
path: root/fs/btrfs/inode.c
diff options
context:
space:
mode:
authorDavid Sterba <dsterba@suse.com>2017-02-17 15:27:44 +0100
committerDavid Sterba <dsterba@suse.com>2017-02-28 14:29:24 +0100
commit4d53dddbec671bcb64a936a3d2b7bf1ce2252ed0 (patch)
tree332a2d50116a1842e1b205f5137abce8ea606628 /fs/btrfs/inode.c
parentc3988d630a4dfec5c09f2b6496734f320949ea9c (diff)
btrfs: document existence of extent_io ops callbacks
Some of the callbacks defined in btree_extent_io_ops and btrfs_extent_io_ops do always exist so we don't need to check the existence before each call. This patch just reorders the definition and documents which are mandatory/optional. Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/inode.c')
-rw-r--r--fs/btrfs/inode.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index b904c74f31fd..3b327c8cfb16 100644
--- a/fs/btrfs/inode.c
+++ b/fs/btrfs/inode.c
@@ -10547,10 +10547,13 @@ static const struct file_operations btrfs_dir_file_operations = {
};
static const struct extent_io_ops btrfs_extent_io_ops = {
- .fill_delalloc = run_delalloc_range,
+ /* mandatory callbacks */
.submit_bio_hook = btrfs_submit_bio_hook,
- .merge_bio_hook = btrfs_merge_bio_hook,
.readpage_end_io_hook = btrfs_readpage_end_io_hook,
+ .merge_bio_hook = btrfs_merge_bio_hook,
+
+ /* optional callbacks */
+ .fill_delalloc = run_delalloc_range,
.writepage_end_io_hook = btrfs_writepage_end_io_hook,
.writepage_start_hook = btrfs_writepage_start_hook,
.set_bit_hook = btrfs_set_bit_hook,