lkml.org 
[lkml]   [2011]   [Nov]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[159/262] ext4: ext4_mkdir should dirty dir_block with newly created directory inode
    3.0-stable review patch.  If anyone has any objections, please let me know.

    ------------------

    From: "Darrick J. Wong" <djwong@us.ibm.com>

    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 | 2 +-
    1 file changed, 1 insertion(+), 1 deletion(-)

    --- a/fs/ext4/namei.c
    +++ b/fs/ext4/namei.c
    @@ -1866,7 +1866,7 @@ retry:
    ext4_set_de_type(dir->i_sb, de, S_IFDIR);
    inode->i_nlink = 2;
    BUFFER_TRACE(dir_block, "call ext4_handle_dirty_metadata");
    - err = ext4_handle_dirty_metadata(handle, dir, dir_block);
    + err = ext4_handle_dirty_metadata(handle, inode, dir_block);
    if (err)
    goto out_clear_inode;
    err = ext4_mark_inode_dirty(handle, inode);



    \
     
     \ /
      Last update: 2011-11-10 04:37    [W:0.137 / U:89.380 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site