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: <31662628-7A29-42C8-A18F-80122EC4F9F4@dilger.ca>
Date:	Mon, 11 Feb 2013 09:00:59 -0700
From:	Andreas Dilger <adilger@...ger.ca>
To:	Theodore Ts'o <tytso@....edu>
Cc:	Ext4 Developers List <linux-ext4@...r.kernel.org>,
	Theodore Ts'o <tytso@....edu>
Subject: Re: [PATCH 12/12] ext4: start handle at the last possible moment when creating inodes

On 2013-02-09, at 14:53, Theodore Ts'o <tytso@....edu> wrote:

> In ext4_{create,mknod,mkdir,symlink}(), don't start the journal handle
> until the inode has been succesfully allocated.  In order to do this,
> we need to start the handle in the ext4_new_inode().  So create a new
> variant of this function, ext4_new_inode_start_handle(), so the handle
> can be created at the last possible minute, before we need to modify
> the inode allocation bitmap block.
> 
> Signed-off-by: "Theodore Ts'o" <tytso@....edu>
> ---
> fs/ext4/ext4.h   | 17 ++++++++--
> fs/ext4/ialloc.c | 15 +++++++--
> fs/ext4/namei.c  | 94 ++++++++++++++++++++++++++------------------------------
> 3 files changed, 71 insertions(+), 55 deletions(-)
> 
> diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h
> index 9897cdf..05940ce 100644
> --- a/fs/ext4/ext4.h
> +++ b/fs/ext4/ext4.h
> @@ -1991,9 +1991,20 @@ extern int ext4fs_dirhash(const char *name, int len, struct
>              dx_hash_info *hinfo);
> 
> /* ialloc.c */
> -extern struct inode *ext4_new_inode(handle_t *, struct inode *, umode_t,
> -                    const struct qstr *qstr, __u32 goal,
> -                    uid_t *owner);
> +extern struct inode *__ext4_new_inode(handle_t *, struct inode *, umode_t,
> +                      const struct qstr *qstr, __u32 goal,
> +                      uid_t *owner, int handle_type,
> +                      unsigned int line_no, int nblocks);
> +
> +#define ext4_new_inode(handle, dir, mode, qstr, goal, owner) \
> +    __ext4_new_inode((handle), (dir), (mode), (qstr), (goal), (owner), \
> +             0, 0, 0)
> +#define ext4_new_inode_start_handle(dir, mode, qstr, goal, owner, \
> +                    type, nblocks)            \
> +    __ext4_new_inode(0, (dir), (mode), (qstr), (goal), (owner), \

Please use "NULL" instead of "0" for pointers.

Cheers, Andreas--
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