[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20170110103315.GB4991@quack2.suse.cz>
Date: Tue, 10 Jan 2017 11:33:15 +0100
From: Jan Kara <jack@...e.cz>
To: Fabian Frederick <fabf@...net.be>
Cc: Jan Kara <jack@...e.com>, linux-kernel@...r.kernel.org,
linux-fsdevel@...r.kernel.org
Subject: Re: [PATCH 02/12 linux-next] udf: use pointer for kernel_long_ad
argument
On Fri 06-01-17 21:53:50, Fabian Frederick wrote:
> 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: Fabian Frederick <fabf@...net.be>
Yeah, it is more obvious this way. OK. Applied.
Honza
> ---
> fs/udf/inode.c | 23 +++++++++--------------
> 1 file changed, 9 insertions(+), 14 deletions(-)
>
> diff --git a/fs/udf/inode.c b/fs/udf/inode.c
> index bab40e7..4a7813b 100644
> --- a/fs/udf/inode.c
> +++ b/fs/udf/inode.c
> @@ -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,
> struct kernel_lb_addr, uint32_t);
> 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,
> - struct kernel_long_ad[EXTENT_MERGE_SIZE], int *);
> -static void udf_merge_extents(struct inode *,
> - struct kernel_long_ad[EXTENT_MERGE_SIZE], int *);
> -static void udf_update_extents(struct inode *,
> - struct kernel_long_ad[EXTENT_MERGE_SIZE], int, int,
> - struct extent_position *);
> + struct kernel_long_ad *, int *);
> +static void udf_merge_extents(struct inode *, struct kernel_long_ad *, int *);
> +static void udf_update_extents(struct inode *, struct kernel_long_ad *, int,
> + int, struct extent_position *);
> static int udf_get_block(struct inode *, sector_t, struct buffer_head *, int);
>
> static void __udf_clear_extent_cache(struct inode *inode)
> @@ -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,
> - int newblocknum,
> - struct kernel_long_ad laarr[EXTENT_MERGE_SIZE],
> + int newblocknum, struct kernel_long_ad *laarr,
> int *endnum)
> {
> unsigned long blocksize = inode->i_sb->s_blocksize;
> @@ -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,
> - struct kernel_long_ad laarr[EXTENT_MERGE_SIZE],
> + struct kernel_long_ad *laarr,
> int *endnum)
> {
> int start, length = 0, currlength = 0, i;
> @@ -1056,8 +1053,7 @@ static void udf_prealloc_extents(struct inode *inode, int c, int lastblock,
> }
> }
>
> -static void udf_merge_extents(struct inode *inode,
> - struct kernel_long_ad laarr[EXTENT_MERGE_SIZE],
> +static void udf_merge_extents(struct inode *inode, struct kernel_long_ad *laarr,
> int *endnum)
> {
> int i;
> @@ -1156,8 +1152,7 @@ static void udf_merge_extents(struct inode *inode,
> }
> }
>
> -static void udf_update_extents(struct inode *inode,
> - struct kernel_long_ad laarr[EXTENT_MERGE_SIZE],
> +static void udf_update_extents(struct inode *inode, struct kernel_long_ad *laarr,
> int startnum, int endnum,
> struct extent_position *epos)
> {
> --
> 2.7.4
>
>
--
Jan Kara <jack@...e.com>
SUSE Labs, CR
Powered by blists - more mailing lists