Re: [PATCH] proc: allow killing processes via file descriptors

From: Daniel Colascione
Date: Sun Nov 18 2018 - 11:03:22 EST


On Sun, Nov 18, 2018 at 3:17 AM, Christian Brauner <christian@xxxxxxxxxx> wrote:
> +static int proc_tgid_open(struct inode *inode, struct file *file)
> +{
> + /* grab reference to struct pid */
> + file->private_data = get_pid(proc_pid(inode));

Why grab another reference to the struct pid when the inode already has one?