lkml.org 
[lkml]   [2018]   [Aug]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 03/13] proc: rename "p" variable in proc_readfd_common()
    Date
    Use slightly more obvious "tsk" and prepare for changes in printing.

    Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
    ---
    fs/proc/fd.c | 10 +++++-----
    1 file changed, 5 insertions(+), 5 deletions(-)

    diff --git a/fs/proc/fd.c b/fs/proc/fd.c
    index 81882a13212d..e098302b5101 100644
    --- a/fs/proc/fd.c
    +++ b/fs/proc/fd.c
    @@ -228,16 +228,16 @@ static struct dentry *proc_lookupfd_common(struct inode *dir,
    static int proc_readfd_common(struct file *file, struct dir_context *ctx,
    instantiate_t instantiate)
    {
    - struct task_struct *p = get_proc_task(file_inode(file));
    + struct task_struct *tsk = get_proc_task(file_inode(file));
    struct files_struct *files;
    unsigned int fd;

    - if (!p)
    + if (!tsk)
    return -ENOENT;

    if (!dir_emit_dots(file, ctx))
    goto out;
    - files = get_files_struct(p);
    + files = get_files_struct(tsk);
    if (!files)
    goto out;

    @@ -259,7 +259,7 @@ static int proc_readfd_common(struct file *file, struct dir_context *ctx,

    len = snprintf(name, sizeof(name), "%u", fd);
    if (!proc_fill_cache(file, ctx,
    - name, len, instantiate, p,
    + name, len, instantiate, tsk,
    &data))
    goto out_fd_loop;
    cond_resched();
    @@ -269,7 +269,7 @@ static int proc_readfd_common(struct file *file, struct dir_context *ctx,
    out_fd_loop:
    put_files_struct(files);
    out:
    - put_task_struct(p);
    + put_task_struct(tsk);
    return 0;
    }

    --
    2.16.4
    \
     
     \ /
      Last update: 2018-08-28 01:16    [W:3.825 / U:0.608 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site