]> www.infradead.org Git - users/jedix/linux-maple.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)
committerMaxim Uvarov <maxim.uvarov@oracle.com>
Thu, 8 Dec 2011 19:18:04 +0000 (11:18 -0800)
commitc07b9449b57efb3057614f0ee64d513fbbe5b320
tree5f572e1ad17eaa4ff571d168117ef729a06a14d3
parentb8286c4193c8d6d4fe1e1d19bad88dacd5993f2c
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