hc
2024-12-19 9370bb92b2d16684ee45cf24e879c93c509162da
kernel/fs/ext4/move_extent.c
....@@ -13,11 +13,10 @@
1313 #include "ext4_extents.h"
1414
1515 /**
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
1918 * @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)
2120 *
2221 * ext4_find_extent wrapper. Return 0 on success, or a negative error value
2322 * on failure.
....@@ -42,8 +41,9 @@
4241 }
4342
4443 /**
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
4747 *
4848 * Acquire write lock of i_data_sem of the two inodes
4949 */
....@@ -215,7 +215,7 @@
215215 for (i = 0; i < nr; i++) {
216216 bh = arr[i];
217217 if (!bh_uptodate_or_lock(bh)) {
218
- err = bh_submit_read(bh);
218
+ err = ext4_read_bh(bh, 0, NULL);
219219 if (err)
220220 return err;
221221 }
....@@ -422,8 +422,8 @@
422422 block_len_in_page, 0, &err2);
423423 ext4_double_up_write_data_sem(orig_inode, donor_inode);
424424 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,"
427427 " data will be lost.");
428428 *err = -EIO;
429429 }
....@@ -686,8 +686,8 @@
686686
687687 out:
688688 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);
691691 }
692692
693693 ext4_ext_drop_refs(path);