Fix missing static function declaration
[ext4-patch-queue.git] / rename-ext4_ext_find_extent
blob4b922eb283c6fcf81251ad435887415eda79e695
1 ext4: rename ext4_ext_find_extent() to ext4_find_extent()
3 Make the function name less redundant.
5 Signed-off-by: Theodore Ts'o <tytso@mit.edu>
6 ---
7  fs/ext4/ext4.h           |  8 ++++----
8  fs/ext4/extents.c        | 38 +++++++++++++++++++-------------------
9  fs/ext4/extents_status.c |  2 +-
10  fs/ext4/migrate.c        |  3 +--
11  fs/ext4/move_extent.c    |  4 ++--
12  5 files changed, 27 insertions(+), 28 deletions(-)
14 diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h
15 index 4a5a6b9..c07f43f 100644
16 --- a/fs/ext4/ext4.h
17 +++ b/fs/ext4/ext4.h
18 @@ -573,7 +573,7 @@ enum {
20  /*
21   * The bit position of these flags must not overlap with any of the
22 - * EXT4_GET_BLOCKS_*.  They are used by ext4_ext_find_extent(),
23 + * EXT4_GET_BLOCKS_*.  They are used by ext4_find_extent(),
24   * read_extent_tree_block(), ext4_split_extent_at(),
25   * ext4_ext_insert_extent(), and ext4_ext_create_new_leaf().
26   * EXT4_EX_NOCACHE is used to indicate that the we shouldn't be
27 @@ -2732,9 +2732,9 @@ extern int ext4_can_extents_be_merged(struct inode *inode,
28  extern int ext4_ext_insert_extent(handle_t *, struct inode *,
29                                   struct ext4_ext_path **,
30                                   struct ext4_extent *, int);
31 -extern struct ext4_ext_path *ext4_ext_find_extent(struct inode *, ext4_lblk_t,
32 -                                                 struct ext4_ext_path **,
33 -                                                 int flags);
34 +extern struct ext4_ext_path *ext4_find_extent(struct inode *, ext4_lblk_t,
35 +                                             struct ext4_ext_path **,
36 +                                             int flags);
37  extern void ext4_ext_drop_refs(struct ext4_ext_path *);
38  extern int ext4_ext_check_inode(struct inode *inode);
39  extern int ext4_find_delalloc_range(struct inode *inode,
40 diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c
41 index bfae63b..47b9aa1 100644
42 --- a/fs/ext4/extents.c
43 +++ b/fs/ext4/extents.c
44 @@ -849,8 +849,8 @@ int ext4_ext_tree_init(handle_t *handle, struct inode *inode)
45  }
47  struct ext4_ext_path *
48 -ext4_ext_find_extent(struct inode *inode, ext4_lblk_t block,
49 -                    struct ext4_ext_path **orig_path, int flags)
50 +ext4_find_extent(struct inode *inode, ext4_lblk_t block,
51 +                struct ext4_ext_path **orig_path, int flags)
52  {
53         struct ext4_extent_header *eh;
54         struct buffer_head *bh;
55 @@ -1358,7 +1358,7 @@ repeat:
56                         goto out;
58                 /* refill path */
59 -               path = ext4_ext_find_extent(inode,
60 +               path = ext4_find_extent(inode,
61                                     (ext4_lblk_t)le32_to_cpu(newext->ee_block),
62                                     ppath, gb_flags);
63                 if (IS_ERR(path))
64 @@ -1370,7 +1370,7 @@ repeat:
65                         goto out;
67                 /* refill path */
68 -               path = ext4_ext_find_extent(inode,
69 +               path = ext4_find_extent(inode,
70                                    (ext4_lblk_t)le32_to_cpu(newext->ee_block),
71                                     ppath, gb_flags);
72                 if (IS_ERR(path)) {
73 @@ -1943,7 +1943,7 @@ int ext4_ext_insert_extent(handle_t *handle, struct inode *inode,
74                 /*
75                  * Try to see whether we should rather test the extent on
76                  * right from ex, or from the left of ex. This is because
77 -                * ext4_ext_find_extent() can return either extent on the
78 +                * ext4_find_extent() can return either extent on the
79                  * left, or on the right from the searched position. This
80                  * will make merging more effective.
81                  */
82 @@ -2026,7 +2026,7 @@ prepend:
83         if (next != EXT_MAX_BLOCKS) {
84                 ext_debug("next leaf block - %u\n", next);
85                 BUG_ON(npath != NULL);
86 -               npath = ext4_ext_find_extent(inode, next, NULL, 0);
87 +               npath = ext4_find_extent(inode, next, NULL, 0);
88                 if (IS_ERR(npath))
89                         return PTR_ERR(npath);
90                 BUG_ON(npath->p_depth != path->p_depth);
91 @@ -2149,7 +2149,7 @@ static int ext4_fill_fiemap_extents(struct inode *inode,
92                 /* find extent for this block */
93                 down_read(&EXT4_I(inode)->i_data_sem);
95 -               path = ext4_ext_find_extent(inode, block, &path, 0);
96 +               path = ext4_find_extent(inode, block, &path, 0);
97                 if (IS_ERR(path)) {
98                         up_read(&EXT4_I(inode)->i_data_sem);
99                         err = PTR_ERR(path);
100 @@ -2832,7 +2832,7 @@ again:
101                 ext4_lblk_t ee_block;
103                 /* find extent for this block */
104 -               path = ext4_ext_find_extent(inode, end, NULL, EXT4_EX_NOCACHE);
105 +               path = ext4_find_extent(inode, end, NULL, EXT4_EX_NOCACHE);
106                 if (IS_ERR(path)) {
107                         ext4_journal_stop(handle);
108                         return PTR_ERR(path);
109 @@ -3320,7 +3320,7 @@ static int ext4_split_extent(handle_t *handle,
110          * Update path is required because previous ext4_split_extent_at() may
111          * result in split of original leaf or extent zeroout.
112          */
113 -       path = ext4_ext_find_extent(inode, map->m_lblk, ppath, 0);
114 +       path = ext4_find_extent(inode, map->m_lblk, ppath, 0);
115         if (IS_ERR(path))
116                 return PTR_ERR(path);
117         depth = ext_depth(inode);
118 @@ -3718,7 +3718,7 @@ static int ext4_convert_unwritten_extents_endio(handle_t *handle,
119                                                  EXT4_GET_BLOCKS_CONVERT);
120                 if (err < 0)
121                         return err;
122 -               path = ext4_ext_find_extent(inode, map->m_lblk, ppath, 0);
123 +               path = ext4_find_extent(inode, map->m_lblk, ppath, 0);
124                 if (IS_ERR(path))
125                         return PTR_ERR(path);
126                 depth = ext_depth(inode);
127 @@ -3946,7 +3946,7 @@ convert_initialized_extent(handle_t *handle, struct inode *inode,
128                                 EXT4_GET_BLOCKS_CONVERT_UNWRITTEN);
129                 if (err < 0)
130                         return err;
131 -               path = ext4_ext_find_extent(inode, map->m_lblk, ppath, 0);
132 +               path = ext4_find_extent(inode, map->m_lblk, ppath, 0);
133                 if (IS_ERR(path))
134                         return PTR_ERR(path);
135                 depth = ext_depth(inode);
136 @@ -4272,7 +4272,7 @@ int ext4_ext_map_blocks(handle_t *handle, struct inode *inode,
137         trace_ext4_ext_map_blocks_enter(inode, map->m_lblk, map->m_len, flags);
139         /* find extent for this block */
140 -       path = ext4_ext_find_extent(inode, map->m_lblk, NULL, 0);
141 +       path = ext4_find_extent(inode, map->m_lblk, NULL, 0);
142         if (IS_ERR(path)) {
143                 err = PTR_ERR(path);
144                 path = NULL;
145 @@ -4284,7 +4284,7 @@ int ext4_ext_map_blocks(handle_t *handle, struct inode *inode,
146         /*
147          * consistent leaf must not be empty;
148          * this situation is possible, though, _during_ tree modification;
149 -        * this is why assert can't be put in ext4_ext_find_extent()
150 +        * this is why assert can't be put in ext4_find_extent()
151          */
152         if (unlikely(path[depth].p_ext == NULL && depth != 0)) {
153                 EXT4_ERROR_INODE(inode, "bad extent address "
154 @@ -4369,7 +4369,7 @@ int ext4_ext_map_blocks(handle_t *handle, struct inode *inode,
156         /*
157          * If we are doing bigalloc, check to see if the extent returned
158 -        * by ext4_ext_find_extent() implies a cluster we can use.
159 +        * by ext4_find_extent() implies a cluster we can use.
160          */
161         if (cluster_offset && ex &&
162             get_implied_cluster_alloc(inode->i_sb, map, ex, path)) {
163 @@ -5299,7 +5299,7 @@ ext4_ext_shift_extents(struct inode *inode, handle_t *handle,
164         ext4_lblk_t ex_start, ex_end;
166         /* Let path point to the last extent */
167 -       path = ext4_ext_find_extent(inode, EXT_MAX_BLOCKS - 1, NULL, 0);
168 +       path = ext4_find_extent(inode, EXT_MAX_BLOCKS - 1, NULL, 0);
169         if (IS_ERR(path))
170                 return PTR_ERR(path);
172 @@ -5319,7 +5319,7 @@ ext4_ext_shift_extents(struct inode *inode, handle_t *handle,
173          * Don't start shifting extents until we make sure the hole is big
174          * enough to accomodate the shift.
175          */
176 -       path = ext4_ext_find_extent(inode, start - 1, &path, 0);
177 +       path = ext4_find_extent(inode, start - 1, &path, 0);
178         if (IS_ERR(path))
179                 return PTR_ERR(path);
180         depth = path->p_depth;
181 @@ -5339,7 +5339,7 @@ ext4_ext_shift_extents(struct inode *inode, handle_t *handle,
183         /* Its safe to start updating extents */
184         while (start < stop_block) {
185 -               path = ext4_ext_find_extent(inode, start, &path, 0);
186 +               path = ext4_find_extent(inode, start, &path, 0);
187                 if (IS_ERR(path))
188                         return PTR_ERR(path);
189                 depth = path->p_depth;
190 @@ -5536,7 +5536,7 @@ ext4_swap_extents(handle_t *handle, struct inode *inode1,
191                 int e1_len, e2_len, len;
192                 int split = 0;
194 -               path1 = ext4_ext_find_extent(inode1, lblk1, NULL, EXT4_EX_NOCACHE);
195 +               path1 = ext4_find_extent(inode1, lblk1, NULL, EXT4_EX_NOCACHE);
196                 if (unlikely(IS_ERR(path1))) {
197                         *erp = PTR_ERR(path1);
198                         path1 = NULL;
199 @@ -5544,7 +5544,7 @@ ext4_swap_extents(handle_t *handle, struct inode *inode1,
200                         count = 0;
201                         goto repeat;
202                 }
203 -               path2 = ext4_ext_find_extent(inode2, lblk2, NULL, EXT4_EX_NOCACHE);
204 +               path2 = ext4_find_extent(inode2, lblk2, NULL, EXT4_EX_NOCACHE);
205                 if (unlikely(IS_ERR(path2))) {
206                         *erp = PTR_ERR(path2);
207                         path2 = NULL;
208 diff --git a/fs/ext4/extents_status.c b/fs/ext4/extents_status.c
209 index 8ffff96..bdd400c 100644
210 --- a/fs/ext4/extents_status.c
211 +++ b/fs/ext4/extents_status.c
212 @@ -426,7 +426,7 @@ static void ext4_es_insert_extent_ext_check(struct inode *inode,
213         unsigned short ee_len;
214         int depth, ee_status, es_status;
216 -       path = ext4_ext_find_extent(inode, es->es_lblk, NULL, EXT4_EX_NOCACHE);
217 +       path = ext4_find_extent(inode, es->es_lblk, NULL, EXT4_EX_NOCACHE);
218         if (IS_ERR(path))
219                 return;
221 diff --git a/fs/ext4/migrate.c b/fs/ext4/migrate.c
222 index 061c300..a432634 100644
223 --- a/fs/ext4/migrate.c
224 +++ b/fs/ext4/migrate.c
225 @@ -41,8 +41,7 @@ static int finish_range(handle_t *handle, struct inode *inode,
226         ext4_ext_store_pblock(&newext, lb->first_pblock);
227         /* Locking only for convinience since we are operating on temp inode */
228         down_write(&EXT4_I(inode)->i_data_sem);
229 -       path = ext4_ext_find_extent(inode, lb->first_block, NULL, 0);
231 +       path = ext4_find_extent(inode, lb->first_block, NULL, 0);
232         if (IS_ERR(path)) {
233                 retval = PTR_ERR(path);
234                 path = NULL;
235 diff --git a/fs/ext4/move_extent.c b/fs/ext4/move_extent.c
236 index 7bf970d..5d78063 100644
237 --- a/fs/ext4/move_extent.c
238 +++ b/fs/ext4/move_extent.c
239 @@ -27,7 +27,7 @@
240   * @lblock:    logical block number to find an extent path
241   * @path:      pointer to an extent path pointer (for output)
242   *
243 - * ext4_ext_find_extent wrapper. Return 0 on success, or a negative error value
244 + * ext4_find_extent wrapper. Return 0 on success, or a negative error value
245   * on failure.
246   */
247  static inline int
248 @@ -36,7 +36,7 @@ get_ext_path(struct inode *inode, ext4_lblk_t lblock,
250         struct ext4_ext_path *path;
252 -       path = ext4_ext_find_extent(inode, lblock, ppath, EXT4_EX_NOCACHE);
253 +       path = ext4_find_extent(inode, lblock, ppath, EXT4_EX_NOCACHE);
254         if (IS_ERR(path))
255                 return PTR_ERR(path);
256         if (path[ext_depth(inode)].p_ext == NULL) {