diff --git a/fs/proc/base.c b/fs/proc/base.c index bf6ba967cffb21d94454b97e907e543e1453b057..93f1cdd5d3d7156b02a42359fb5999232020765c 100644 --- a/fs/proc/base.c +++ b/fs/proc/base.c @@ -745,14 +745,7 @@ static int proc_single_show(struct seq_file *m, void *v) static int proc_single_open(struct inode *inode, struct file *filp) { - int ret; - ret = single_open(filp, proc_single_show, NULL); - if (!ret) { - struct seq_file *m = filp->private_data; - - m->private = inode; - } - return ret; + return single_open(filp, proc_single_show, inode); } static const struct file_operations proc_single_file_operations = { @@ -1380,15 +1373,7 @@ sched_write(struct file *file, const char __user *buf, static int sched_open(struct inode *inode, struct file *filp) { - int ret; - - ret = single_open(filp, sched_show, NULL); - if (!ret) { - struct seq_file *m = filp->private_data; - - m->private = inode; - } - return ret; + return single_open(filp, sched_show, inode); } static const struct file_operations proc_pid_sched_operations = { @@ -1524,15 +1509,7 @@ static int comm_show(struct seq_file *m, void *v) static int comm_open(struct inode *inode, struct file *filp) { - int ret; - - ret = single_open(filp, comm_show, NULL); - if (!ret) { - struct seq_file *m = filp->private_data; - - m->private = inode; - } - return ret; + return single_open(filp, comm_show, inode); } static const struct file_operations proc_pid_set_comm_operations = {