aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDmitry Monakhov <dmonakhov@openvz.org>2014-08-30 23:50:56 -0400
committerTheodore Ts'o <tytso@mit.edu>2014-08-30 23:50:56 -0400
commitf8fb4f415034baeed983ca2fb0f51bd74d7370b0 (patch)
tree8c3c0795608c995d0da536db2c47ae9742b0d39b
parentee124d2746250786b306952bb8955d3171fa8e69 (diff)
ext4: use ext4_ext_next_allocated_block instead of mext_next_extent
This allows us to make mext_next_extent static and potentially get rid of it. Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
-rw-r--r--fs/ext4/ext4.h2
-rw-r--r--fs/ext4/extents.c16
-rw-r--r--fs/ext4/move_extent.c2
3 files changed, 8 insertions, 12 deletions
diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h
index ca53bcece838..420c9be9f7ae 100644
--- a/fs/ext4/ext4.h
+++ b/fs/ext4/ext4.h
@@ -2753,8 +2753,6 @@ extern void ext4_double_up_write_data_sem(struct inode *orig_inode,
2753extern int ext4_move_extents(struct file *o_filp, struct file *d_filp, 2753extern int ext4_move_extents(struct file *o_filp, struct file *d_filp,
2754 __u64 start_orig, __u64 start_donor, 2754 __u64 start_orig, __u64 start_donor,
2755 __u64 len, __u64 *moved_len); 2755 __u64 len, __u64 *moved_len);
2756extern int mext_next_extent(struct inode *inode, struct ext4_ext_path *path,
2757 struct ext4_extent **extent);
2758 2756
2759/* page-io.c */ 2757/* page-io.c */
2760extern int __init ext4_init_pageio(void); 2758extern int __init ext4_init_pageio(void);
diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c
index 74292a71b384..1b768343ddf1 100644
--- a/fs/ext4/extents.c
+++ b/fs/ext4/extents.c
@@ -5304,7 +5304,7 @@ ext4_ext_shift_extents(struct inode *inode, handle_t *handle,
5304 struct ext4_ext_path *path; 5304 struct ext4_ext_path *path;
5305 int ret = 0, depth; 5305 int ret = 0, depth;
5306 struct ext4_extent *extent; 5306 struct ext4_extent *extent;
5307 ext4_lblk_t stop_block, current_block; 5307 ext4_lblk_t stop_block;
5308 ext4_lblk_t ex_start, ex_end; 5308 ext4_lblk_t ex_start, ex_end;
5309 5309
5310 /* Let path point to the last extent */ 5310 /* Let path point to the last extent */
@@ -5365,17 +5365,15 @@ ext4_ext_shift_extents(struct inode *inode, handle_t *handle,
5365 (unsigned long) start); 5365 (unsigned long) start);
5366 return -EIO; 5366 return -EIO;
5367 } 5367 }
5368 5368 if (start > le32_to_cpu(extent->ee_block)) {
5369 current_block = le32_to_cpu(extent->ee_block);
5370 if (start > current_block) {
5371 /* Hole, move to the next extent */ 5369 /* Hole, move to the next extent */
5372 ret = mext_next_extent(inode, path, &extent); 5370 if (extent < EXT_LAST_EXTENT(path[depth].p_hdr)) {
5373 if (ret != 0) { 5371 path[depth].p_ext++;
5372 } else {
5373 start = ext4_ext_next_allocated_block(path);
5374 ext4_ext_drop_refs(path); 5374 ext4_ext_drop_refs(path);
5375 kfree(path); 5375 kfree(path);
5376 if (ret == 1) 5376 continue;
5377 ret = 0;
5378 break;
5379 } 5377 }
5380 } 5378 }
5381 ret = ext4_ext_shift_path_extents(path, shift, inode, 5379 ret = ext4_ext_shift_path_extents(path, shift, inode,
diff --git a/fs/ext4/move_extent.c b/fs/ext4/move_extent.c
index 671a74b14fd7..123a51b05965 100644
--- a/fs/ext4/move_extent.c
+++ b/fs/ext4/move_extent.c
@@ -76,7 +76,7 @@ copy_extent_status(struct ext4_extent *src, struct ext4_extent *dest)
76 * ext4_ext_path structure refers to the last extent, or a negative error 76 * ext4_ext_path structure refers to the last extent, or a negative error
77 * value on failure. 77 * value on failure.
78 */ 78 */
79int 79static int
80mext_next_extent(struct inode *inode, struct ext4_ext_path *path, 80mext_next_extent(struct inode *inode, struct ext4_ext_path *path,
81 struct ext4_extent **extent) 81 struct ext4_extent **extent)
82{ 82{