linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ext4: ext4_mkdir should dirty dir_block with the parent inode
@ 2011-08-17  3:39 Darrick J. Wong
  2011-09-30 19:45 ` Darrick J. Wong
  0 siblings, 1 reply; 2+ messages in thread
From: Darrick J. Wong @ 2011-08-17  3:39 UTC (permalink / raw)
  To: Theodore Ts'o; +Cc: linux-ext4, linux-kernel

ext4_mkdir calls ext4_handle_dirty_metadata with dir_block and the inode "dir".
Unfortunately, dir_block belongs to the newly created directory (which is
"inode"), not the parent directory (which is "dir").  Fix the incorrect
association.

Signed-off-by: Darrick J. Wong <djwong@us.ibm.com>
---

 fs/ext4/namei.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/fs/ext4/namei.c b/fs/ext4/namei.c
index 2b5c34b..a2c2855 100644
--- a/fs/ext4/namei.c
+++ b/fs/ext4/namei.c
@@ -1866,7 +1866,7 @@ retry:
 	ext4_set_de_type(dir->i_sb, de, S_IFDIR);
 	inode->i_nlink = 2;
 	BUFFER_TRACE(dir_block, "call ext4_handle_dirty_metadata");
-	err = ext4_handle_dirty_metadata(handle, dir, dir_block);
+	err = ext4_handle_dirty_metadata(handle, inode, dir_block);
 	if (err)
 		goto out_clear_inode;
 	err = ext4_mark_inode_dirty(handle, inode);

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] ext4: ext4_mkdir should dirty dir_block with the parent inode
  2011-08-17  3:39 [PATCH] ext4: ext4_mkdir should dirty dir_block with the parent inode Darrick J. Wong
@ 2011-09-30 19:45 ` Darrick J. Wong
  0 siblings, 0 replies; 2+ messages in thread
From: Darrick J. Wong @ 2011-09-30 19:45 UTC (permalink / raw)
  To: Theodore Ts'o; +Cc: linux-ext4, linux-kernel

On Tue, Aug 16, 2011 at 08:39:54PM -0700, Darrick J. Wong wrote:
> ext4_mkdir calls ext4_handle_dirty_metadata with dir_block and the inode "dir".
> Unfortunately, dir_block belongs to the newly created directory (which is
> "inode"), not the parent directory (which is "dir").  Fix the incorrect
> association.

Any thoughts about this one, Ted?

--D
> 
> Signed-off-by: Darrick J. Wong <djwong@us.ibm.com>
> ---
> 
>  fs/ext4/namei.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/fs/ext4/namei.c b/fs/ext4/namei.c
> index 2b5c34b..a2c2855 100644
> --- a/fs/ext4/namei.c
> +++ b/fs/ext4/namei.c
> @@ -1866,7 +1866,7 @@ retry:
>  	ext4_set_de_type(dir->i_sb, de, S_IFDIR);
>  	inode->i_nlink = 2;
>  	BUFFER_TRACE(dir_block, "call ext4_handle_dirty_metadata");
> -	err = ext4_handle_dirty_metadata(handle, dir, dir_block);
> +	err = ext4_handle_dirty_metadata(handle, inode, dir_block);
>  	if (err)
>  		goto out_clear_inode;
>  	err = ext4_mark_inode_dirty(handle, inode);
> --
> To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-09-30 19:45 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-08-17  3:39 [PATCH] ext4: ext4_mkdir should dirty dir_block with the parent inode Darrick J. Wong
2011-09-30 19:45 ` Darrick J. Wong

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).