ext4: call ext4_handle_dirty_metadata with correct inode in ext4_dx_add_entry
commit5930ea643805feb50a2f8383ae12eb6f10935e49
authorTheodore Ts'o <tytso@mit.edu>
Wed, 31 Aug 2011 16:02:51 +0000 (31 12:02 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Wed, 31 Aug 2011 16:02:51 +0000 (31 12:02 -0400)
tree9052dd47da0d9d6796342a07ebffe0329647b9cb
parentf9287c1f2d329f4d78a3bbc9cf0db0ebae6f146a
ext4: call ext4_handle_dirty_metadata with correct inode in ext4_dx_add_entry

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>
Cc: stable@kernel.org
fs/ext4/namei.c