Skip to contentSkip to conversation

proc: remove useless WARN_ONs

PATCH New Alexey Dobriyan 1 participant 1 message Nov 9, 2008 Proc filesystem

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 proc: remove useless WARN_ONs

[added to proc.git]

commit 9f5560c4df483908659fca33e7fa768832f933b2

Author: Alexey Dobriyan <[email protected]>
Date:   Sun Nov 9 23:12:18 2008 +0300

proc: remove useless WARN_ONs

NULL "struct inode *" means VFS passed NULL inode to ->open.

fs/proc/base.c +0 -4
index 486cf3f..4a1c578 100644
@@ -1186,8 +1186,6 @@ static int sched_show(struct seq_file *m, void *v)
 	struct inode *inode = m->private;
 	struct task_struct *p;
 
-	WARN_ON(!inode);
-
 	p = get_proc_task(inode);
 	if (!p)
 		return -ESRCH;
@@ -1205,8 +1203,6 @@ sched_write(struct file *file, const char __user *buf,
 	struct inode *inode = file->f_path.dentry->d_inode;
 	struct task_struct *p;
 
-	WARN_ON(!inode);
-
 	p = get_proc_task(inode);
 	if (!p)
 		return -ESRCH;