Ocfs2: Make ocfs2_find_cpos_for_left_leaf() public.
authorTristan Ye <tristan.ye@oracle.com>
Tue, 11 May 2010 09:54:44 +0000 (17:54 +0800)
committerJoel Becker <joel.becker@oracle.com>
Tue, 18 May 2010 19:28:13 +0000 (12:28 -0700)
The original idea to pull ocfs2_find_cpos_for_left_leaf() out of
alloc.c is to benefit punching-holes optimization patch, it however,
can also be referred by other funcs in the future who want to do the
same job.

Signed-off-by: Tristan Ye <tristan.ye@oracle.com>
Acked-by: Mark Fasheh <mfasheh@suse.com>
Signed-off-by: Joel Becker <joel.becker@oracle.com>
fs/ocfs2/alloc.c
fs/ocfs2/alloc.h

index 0cb4248e03cd798910a71ff29c5aa75939e1ce75..7e9cb753fba79102f48574237b80c3b8ea5a69da 100644 (file)
@@ -2209,8 +2209,8 @@ out:
  *
  * Will return zero if the path passed in is already the leftmost path.
  */
-static int ocfs2_find_cpos_for_left_leaf(struct super_block *sb,
-                                        struct ocfs2_path *path, u32 *cpos)
+int ocfs2_find_cpos_for_left_leaf(struct super_block *sb,
+                                 struct ocfs2_path *path, u32 *cpos)
 {
        int i, j, ret = 0;
        u64 blkno;
index 4fb9882ed2d626aa61e50274dc1ed42aed3ccb76..a55a27bb96a559b2a19cf2a7435369d6f607d2dc 100644 (file)
@@ -319,6 +319,8 @@ int ocfs2_journal_access_path(struct ocfs2_caching_info *ci,
                              struct ocfs2_path *path);
 int ocfs2_find_cpos_for_right_leaf(struct super_block *sb,
                                   struct ocfs2_path *path, u32 *cpos);
+int ocfs2_find_cpos_for_left_leaf(struct super_block *sb,
+                                 struct ocfs2_path *path, u32 *cpos);
 int ocfs2_find_subtree_root(struct ocfs2_extent_tree *et,
                            struct ocfs2_path *left,
                            struct ocfs2_path *right);