[lkml]   [2006]   [Nov]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    Patch in this message
    Subject[PATCH 3/5] DebugFS : file/directory creation error handling, 2.6.19-rc6
    Fix error handling of file and directory creation in DebugFS.

    The error path should release the file system because no _remove will be called
    for this erroneous creation.

    Signed-off-by: Mathieu Desnoyers <>

    -- BEGIN --
    --- a/fs/debugfs/inode.c
    +++ b/fs/debugfs/inode.c
    @@ -205,13 +205,15 @@ struct dentry *debugfs_create_file(const

    pr_debug("debugfs: creating file '%s'\n",name);

    - error = simple_pin_fs(&debug_fs_type, &debugfs_mount, &debugfs_mount_count);
    + error = simple_pin_fs(&debug_fs_type, &debugfs_mount,
    + &debugfs_mount_count);
    if (error)
    goto exit;

    error = debugfs_create_by_name(name, mode, parent, &dentry);
    if (error) {
    dentry = NULL;
    + simple_release_fs(&debugfs_mount, &debugfs_mount_count);
    goto exit;

    -- END --
    OpenPGP public key:
    Key fingerprint: 8CD5 52C3 8E3C 4140 715F BA06 3F25 A8FE 3BAE 9A68
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to
    More majordomo info at
    Please read the FAQ at

     \ /
      Last update: 2006-11-24 19:51    [W:0.020 / U:2.548 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site