lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1203014797.3637.23.camel@localhost.localdomain>
Date:	Thu, 14 Feb 2008 10:46:37 -0800
From:	Mingming Cao <cmm@...ibm.com>
To:	"Aneesh Kumar K.V" <aneesh.kumar@...ux.vnet.ibm.com>
Cc:	tytso@....edu, linux-ext4@...r.kernel.org
Subject: Re: [RFC/PATCH] ext4: Request for journal write access early.

On Thu, 2008-02-14 at 16:00 +0530, Aneesh Kumar K.V wrote:
> In ext4_ext_convert_to_initialized before we need to request for journal
> write access before we even modify the extent length.
> 
Acked.
Thanks
Mingming
> Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@...ux.vnet.ibm.com>
> ---
>  fs/ext4/extents.c |   11 ++++++++---
>  1 files changed, 8 insertions(+), 3 deletions(-)
> 
> diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c
> index 995ac16..c4d6f19 100644
> --- a/fs/ext4/extents.c
> +++ b/fs/ext4/extents.c
> @@ -2168,6 +2168,10 @@ static int ext4_ext_convert_to_initialized(handle_t *handle,
>  	newblock = iblock - ee_block + ext_pblock(ex);
>  	ex2 = ex;
> 
> +	err = ext4_ext_get_access(handle, inode, path + depth);
> +	if (err)
> +		goto out;
> +
>  	/* ex1: ee_block to iblock - 1 : uninitialized */
>  	if (iblock > ee_block) {
>  		ex1 = ex;
> @@ -2210,6 +2214,10 @@ static int ext4_ext_convert_to_initialized(handle_t *handle,
>  			ex = path[depth].p_ext;
>  			if (ex2 != &newex)
>  				ex2 = ex;
> +
> +			err = ext4_ext_get_access(handle, inode, path + depth);
> +			if (err)
> +				goto out;
>  		}
>  		allocated = max_blocks;
>  	}
> @@ -2230,9 +2238,6 @@ static int ext4_ext_convert_to_initialized(handle_t *handle,
>  	ex2->ee_len = cpu_to_le16(allocated);
>  	if (ex2 != ex)
>  		goto insert;
> -	err = ext4_ext_get_access(handle, inode, path + depth);
> -	if (err)
> -		goto out;
>  	/*
>  	 * New (initialized) extent starts from the first block
>  	 * in the current extent. i.e., ex2 == ex

-
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ