.. | .. |
---|
13 | 13 | #include "ext4_extents.h" |
---|
14 | 14 | |
---|
15 | 15 | /** |
---|
16 | | - * get_ext_path - Find an extent path for designated logical block number. |
---|
17 | | - * |
---|
18 | | - * @inode: an inode which is searched |
---|
| 16 | + * get_ext_path() - Find an extent path for designated logical block number. |
---|
| 17 | + * @inode: inode to be searched |
---|
19 | 18 | * @lblock: logical block number to find an extent path |
---|
20 | | - * @path: pointer to an extent path pointer (for output) |
---|
| 19 | + * @ppath: pointer to an extent path pointer (for output) |
---|
21 | 20 | * |
---|
22 | 21 | * ext4_find_extent wrapper. Return 0 on success, or a negative error value |
---|
23 | 22 | * on failure. |
---|
.. | .. |
---|
42 | 41 | } |
---|
43 | 42 | |
---|
44 | 43 | /** |
---|
45 | | - * ext4_double_down_write_data_sem - Acquire two inodes' write lock |
---|
46 | | - * of i_data_sem |
---|
| 44 | + * ext4_double_down_write_data_sem() - write lock two inodes's i_data_sem |
---|
| 45 | + * @first: inode to be locked |
---|
| 46 | + * @second: inode to be locked |
---|
47 | 47 | * |
---|
48 | 48 | * Acquire write lock of i_data_sem of the two inodes |
---|
49 | 49 | */ |
---|
.. | .. |
---|
215 | 215 | for (i = 0; i < nr; i++) { |
---|
216 | 216 | bh = arr[i]; |
---|
217 | 217 | if (!bh_uptodate_or_lock(bh)) { |
---|
218 | | - err = bh_submit_read(bh); |
---|
| 218 | + err = ext4_read_bh(bh, 0, NULL); |
---|
219 | 219 | if (err) |
---|
220 | 220 | return err; |
---|
221 | 221 | } |
---|
.. | .. |
---|
422 | 422 | block_len_in_page, 0, &err2); |
---|
423 | 423 | ext4_double_up_write_data_sem(orig_inode, donor_inode); |
---|
424 | 424 | if (replaced_count != block_len_in_page) { |
---|
425 | | - EXT4_ERROR_INODE_BLOCK(orig_inode, (sector_t)(orig_blk_offset), |
---|
426 | | - "Unable to copy data block," |
---|
| 425 | + ext4_error_inode_block(orig_inode, (sector_t)(orig_blk_offset), |
---|
| 426 | + EIO, "Unable to copy data block," |
---|
427 | 427 | " data will be lost."); |
---|
428 | 428 | *err = -EIO; |
---|
429 | 429 | } |
---|
.. | .. |
---|
686 | 686 | |
---|
687 | 687 | out: |
---|
688 | 688 | if (*moved_len) { |
---|
689 | | - ext4_discard_preallocations(orig_inode); |
---|
690 | | - ext4_discard_preallocations(donor_inode); |
---|
| 689 | + ext4_discard_preallocations(orig_inode, 0); |
---|
| 690 | + ext4_discard_preallocations(donor_inode, 0); |
---|
691 | 691 | } |
---|
692 | 692 | |
---|
693 | 693 | ext4_ext_drop_refs(path); |
---|