ext4: ext4_mkdir should dirty dir_block with newly created directory inode
authorDarrick J. Wong <djwong@us.ibm.com>
Wed, 31 Aug 2011 16:00:51 +0000 (12:00 -0400)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 11 Nov 2011 17:43:52 +0000 (09:43 -0800)
commit523d90b566448dd9ca31b0a93b3cf9f601118d5c
tree636aec7ac6d37d7869d41cda9c06c51741d0bc5b
parent76e72d11365ce08b2800ac70b7abc0d46ee9727d
ext4: ext4_mkdir should dirty dir_block with newly created directory inode

commit f9287c1f2d329f4d78a3bbc9cf0db0ebae6f146a upstream.

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>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
fs/ext4/namei.c