Commit 3cc6f844 authored by Fabian Frederick's avatar Fabian Frederick Committed by Jan Kara

udf: use pointer for kernel_long_ad argument

Having struct kernel_long_ad laarr[EXTENT_MERGE_SIZE]
in all function arguments could be understood as by-value parameter.
Use kernel_long_ad pointer for functions depending on
inode_getblk()
Signed-off-by: default avatarFabian Frederick <fabf@skynet.be>
Signed-off-by: default avatarJan Kara <jack@suse.cz>
parent 75f27138
...@@ -57,14 +57,12 @@ static sector_t inode_getblk(struct inode *, sector_t, int *, int *); ...@@ -57,14 +57,12 @@ static sector_t inode_getblk(struct inode *, sector_t, int *, int *);
static int8_t udf_insert_aext(struct inode *, struct extent_position, static int8_t udf_insert_aext(struct inode *, struct extent_position,
struct kernel_lb_addr, uint32_t); struct kernel_lb_addr, uint32_t);
static void udf_split_extents(struct inode *, int *, int, int, static void udf_split_extents(struct inode *, int *, int, int,
struct kernel_long_ad[EXTENT_MERGE_SIZE], int *); struct kernel_long_ad *, int *);
static void udf_prealloc_extents(struct inode *, int, int, static void udf_prealloc_extents(struct inode *, int, int,
struct kernel_long_ad[EXTENT_MERGE_SIZE], int *); struct kernel_long_ad *, int *);
static void udf_merge_extents(struct inode *, static void udf_merge_extents(struct inode *, struct kernel_long_ad *, int *);
struct kernel_long_ad[EXTENT_MERGE_SIZE], int *); static void udf_update_extents(struct inode *, struct kernel_long_ad *, int,
static void udf_update_extents(struct inode *, int, struct extent_position *);
struct kernel_long_ad[EXTENT_MERGE_SIZE], int, int,
struct extent_position *);
static int udf_get_block(struct inode *, sector_t, struct buffer_head *, int); static int udf_get_block(struct inode *, sector_t, struct buffer_head *, int);
static void __udf_clear_extent_cache(struct inode *inode) static void __udf_clear_extent_cache(struct inode *inode)
...@@ -896,8 +894,7 @@ static sector_t inode_getblk(struct inode *inode, sector_t block, ...@@ -896,8 +894,7 @@ static sector_t inode_getblk(struct inode *inode, sector_t block,
} }
static void udf_split_extents(struct inode *inode, int *c, int offset, static void udf_split_extents(struct inode *inode, int *c, int offset,
int newblocknum, int newblocknum, struct kernel_long_ad *laarr,
struct kernel_long_ad laarr[EXTENT_MERGE_SIZE],
int *endnum) int *endnum)
{ {
unsigned long blocksize = inode->i_sb->s_blocksize; unsigned long blocksize = inode->i_sb->s_blocksize;
...@@ -961,7 +958,7 @@ static void udf_split_extents(struct inode *inode, int *c, int offset, ...@@ -961,7 +958,7 @@ static void udf_split_extents(struct inode *inode, int *c, int offset,
} }
static void udf_prealloc_extents(struct inode *inode, int c, int lastblock, static void udf_prealloc_extents(struct inode *inode, int c, int lastblock,
struct kernel_long_ad laarr[EXTENT_MERGE_SIZE], struct kernel_long_ad *laarr,
int *endnum) int *endnum)
{ {
int start, length = 0, currlength = 0, i; int start, length = 0, currlength = 0, i;
...@@ -1056,8 +1053,7 @@ static void udf_prealloc_extents(struct inode *inode, int c, int lastblock, ...@@ -1056,8 +1053,7 @@ static void udf_prealloc_extents(struct inode *inode, int c, int lastblock,
} }
} }
static void udf_merge_extents(struct inode *inode, static void udf_merge_extents(struct inode *inode, struct kernel_long_ad *laarr,
struct kernel_long_ad laarr[EXTENT_MERGE_SIZE],
int *endnum) int *endnum)
{ {
int i; int i;
...@@ -1156,8 +1152,7 @@ static void udf_merge_extents(struct inode *inode, ...@@ -1156,8 +1152,7 @@ static void udf_merge_extents(struct inode *inode,
} }
} }
static void udf_update_extents(struct inode *inode, static void udf_update_extents(struct inode *inode, struct kernel_long_ad *laarr,
struct kernel_long_ad laarr[EXTENT_MERGE_SIZE],
int startnum, int endnum, int startnum, int endnum,
struct extent_position *epos) struct extent_position *epos)
{ {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment