diff options
author | Darrick J. Wong <djwong@us.ibm.com> | 2011-08-31 12:00:51 -0400 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2011-08-31 12:00:51 -0400 |
commit | f9287c1f2d329f4d78a3bbc9cf0db0ebae6f146a (patch) | |
tree | a7bb496f63a0b65e8edbdc72b596f64dd9ecc1b6 | |
parent | bcaa992975041e40449be8c010c26192b8c8b409 (diff) |
ext4: ext4_mkdir should dirty dir_block with newly created directory inode
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>
Cc: stable@kernel.org
-rw-r--r-- | 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 09f930b7a785..f0abe4323136 100644 --- a/fs/ext4/namei.c +++ b/fs/ext4/namei.c | |||
@@ -1862,7 +1862,7 @@ retry: | |||
1862 | ext4_set_de_type(dir->i_sb, de, S_IFDIR); | 1862 | ext4_set_de_type(dir->i_sb, de, S_IFDIR); |
1863 | inode->i_nlink = 2; | 1863 | inode->i_nlink = 2; |
1864 | BUFFER_TRACE(dir_block, "call ext4_handle_dirty_metadata"); | 1864 | BUFFER_TRACE(dir_block, "call ext4_handle_dirty_metadata"); |
1865 | err = ext4_handle_dirty_metadata(handle, dir, dir_block); | 1865 | err = ext4_handle_dirty_metadata(handle, inode, dir_block); |
1866 | if (err) | 1866 | if (err) |
1867 | goto out_clear_inode; | 1867 | goto out_clear_inode; |
1868 | err = ext4_mark_inode_dirty(handle, inode); | 1868 | err = ext4_mark_inode_dirty(handle, inode); |