diff options
Diffstat (limited to 'fs/btrfs/file-item.c')
-rw-r--r-- | fs/btrfs/file-item.c | 30 |
1 files changed, 5 insertions, 25 deletions
diff --git a/fs/btrfs/file-item.c b/fs/btrfs/file-item.c index 769eb86f890c..b193bf324a41 100644 --- a/fs/btrfs/file-item.c +++ b/fs/btrfs/file-item.c | |||
@@ -83,10 +83,11 @@ out: | |||
83 | return ret; | 83 | return ret; |
84 | } | 84 | } |
85 | 85 | ||
86 | struct btrfs_csum_item *btrfs_lookup_csum(struct btrfs_trans_handle *trans, | 86 | static struct btrfs_csum_item * |
87 | struct btrfs_root *root, | 87 | btrfs_lookup_csum(struct btrfs_trans_handle *trans, |
88 | struct btrfs_path *path, | 88 | struct btrfs_root *root, |
89 | u64 bytenr, int cow) | 89 | struct btrfs_path *path, |
90 | u64 bytenr, int cow) | ||
90 | { | 91 | { |
91 | int ret; | 92 | int ret; |
92 | struct btrfs_key file_key; | 93 | struct btrfs_key file_key; |
@@ -152,27 +153,6 @@ int btrfs_lookup_file_extent(struct btrfs_trans_handle *trans, | |||
152 | return ret; | 153 | return ret; |
153 | } | 154 | } |
154 | 155 | ||
155 | u64 btrfs_file_extent_length(struct btrfs_path *path) | ||
156 | { | ||
157 | int extent_type; | ||
158 | struct btrfs_file_extent_item *fi; | ||
159 | u64 len; | ||
160 | |||
161 | fi = btrfs_item_ptr(path->nodes[0], path->slots[0], | ||
162 | struct btrfs_file_extent_item); | ||
163 | extent_type = btrfs_file_extent_type(path->nodes[0], fi); | ||
164 | |||
165 | if (extent_type == BTRFS_FILE_EXTENT_REG || | ||
166 | extent_type == BTRFS_FILE_EXTENT_PREALLOC) | ||
167 | len = btrfs_file_extent_num_bytes(path->nodes[0], fi); | ||
168 | else if (extent_type == BTRFS_FILE_EXTENT_INLINE) | ||
169 | len = btrfs_file_extent_inline_len(path->nodes[0], fi); | ||
170 | else | ||
171 | BUG(); | ||
172 | |||
173 | return len; | ||
174 | } | ||
175 | |||
176 | static int __btrfs_lookup_bio_sums(struct btrfs_root *root, | 156 | static int __btrfs_lookup_bio_sums(struct btrfs_root *root, |
177 | struct inode *inode, struct bio *bio, | 157 | struct inode *inode, struct bio *bio, |
178 | u64 logical_offset, u32 *dst, int dio) | 158 | u64 logical_offset, u32 *dst, int dio) |