]> git.karo-electronics.de Git - karo-tx-linux.git/commit
ext4: call ext4_handle_dirty_metadata with correct inode in ext4_dx_add_entry
authorTheodore Ts'o <tytso@mit.edu>
Wed, 31 Aug 2011 16:02:51 +0000 (12:02 -0400)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 11 Nov 2011 17:43:52 +0000 (09:43 -0800)
commitcaf61680a4f161a4b6d1c6e734ec0fb8233d45d7
treef631291fa6afaa3f62ac09f9d370a72ca1da7aa0
parent523d90b566448dd9ca31b0a93b3cf9f601118d5c
ext4: call ext4_handle_dirty_metadata with correct inode in ext4_dx_add_entry

commit 5930ea643805feb50a2f8383ae12eb6f10935e49 upstream.

ext4_dx_add_entry manipulates bh2 and frames[0].bh, which are two buffer_heads
that point to directory blocks assigned to the directory inode.  However, the
function calls ext4_handle_dirty_metadata with the inode of the file that's
being added to the directory, not the directory inode itself.  Therefore,
correct the code to dirty the directory buffers with the directory inode, not
the file inode.

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