Explorar o código

Ocfs2: Make ocfs2_find_cpos_for_left_leaf() public.

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>
Tristan Ye %!s(int64=15) %!d(string=hai) anos
pai
achega
ee149a7c6c
Modificáronse 2 ficheiros con 4 adicións e 2 borrados
  1. 2 2
      fs/ocfs2/alloc.c
  2. 2 0
      fs/ocfs2/alloc.h

+ 2 - 2
fs/ocfs2/alloc.c

@@ -2209,8 +2209,8 @@ out:
  *
  *
  * Will return zero if the path passed in is already the leftmost path.
  * 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;
 	int i, j, ret = 0;
 	u64 blkno;
 	u64 blkno;

+ 2 - 0
fs/ocfs2/alloc.h

@@ -319,6 +319,8 @@ int ocfs2_journal_access_path(struct ocfs2_caching_info *ci,
 			      struct ocfs2_path *path);
 			      struct ocfs2_path *path);
 int ocfs2_find_cpos_for_right_leaf(struct super_block *sb,
 int ocfs2_find_cpos_for_right_leaf(struct super_block *sb,
 				   struct ocfs2_path *path, u32 *cpos);
 				   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,
 int ocfs2_find_subtree_root(struct ocfs2_extent_tree *et,
 			    struct ocfs2_path *left,
 			    struct ocfs2_path *left,
 			    struct ocfs2_path *right);
 			    struct ocfs2_path *right);