Skip to content

Commit ecae934

Browse files
author
Alexey Dobriyan
committed
proc: remove useless WARN_ONs
NULL "struct inode *" means VFS passed NULL inode to ->open. Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
1 parent b4df2b9 commit ecae934

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

fs/proc/base.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1186,8 +1186,6 @@ static int sched_show(struct seq_file *m, void *v)
11861186
struct inode *inode = m->private;
11871187
struct task_struct *p;
11881188

1189-
WARN_ON(!inode);
1190-
11911189
p = get_proc_task(inode);
11921190
if (!p)
11931191
return -ESRCH;
@@ -1205,8 +1203,6 @@ sched_write(struct file *file, const char __user *buf,
12051203
struct inode *inode = file->f_path.dentry->d_inode;
12061204
struct task_struct *p;
12071205

1208-
WARN_ON(!inode);
1209-
12101206
p = get_proc_task(inode);
12111207
if (!p)
12121208
return -ESRCH;

0 commit comments

Comments
 (0)