lkml.org 
[lkml]   [2013]   [Dec]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 3.12 112/118] Btrfs: take ordered root lock when removing ordered operations inode
    Date
    3.12-stable review patch.  If anyone has any objections, please let me know.

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

    From: Josef Bacik <jbacik@fusionio.com>

    commit 93858769172c4e3678917810e9d5de360eb991cc upstream.

    A user reported a list corruption warning from btrfs_remove_ordered_extent, it
    is because we aren't taking the ordered_root_lock when we remove the inode from
    the ordered operations list. Thanks,

    Signed-off-by: Josef Bacik <jbacik@fusionio.com>
    Signed-off-by: Chris Mason <chris.mason@fusionio.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

    ---
    fs/btrfs/ordered-data.c | 2 ++
    1 file changed, 2 insertions(+)

    --- a/fs/btrfs/ordered-data.c
    +++ b/fs/btrfs/ordered-data.c
    @@ -537,7 +537,9 @@ void btrfs_remove_ordered_extent(struct
    */
    if (RB_EMPTY_ROOT(&tree->tree) &&
    !mapping_tagged(inode->i_mapping, PAGECACHE_TAG_DIRTY)) {
    + spin_lock(&root->fs_info->ordered_root_lock);
    list_del_init(&BTRFS_I(inode)->ordered_operations);
    + spin_unlock(&root->fs_info->ordered_root_lock);
    }

    if (!root->nr_ordered_extents) {



    \
     
     \ /
      Last update: 2013-12-19 02:01    [W:2.171 / U:0.064 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site