mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-13 22:56:27 +08:00
proc: remove useless WARN_ONs
NULL "struct inode *" means VFS passed NULL inode to ->open. Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
This commit is contained in:
parent
b4df2b92d8
commit
ecae934edc
@ -1186,8 +1186,6 @@ static int sched_show(struct seq_file *m, void *v)
|
|||||||
struct inode *inode = m->private;
|
struct inode *inode = m->private;
|
||||||
struct task_struct *p;
|
struct task_struct *p;
|
||||||
|
|
||||||
WARN_ON(!inode);
|
|
||||||
|
|
||||||
p = get_proc_task(inode);
|
p = get_proc_task(inode);
|
||||||
if (!p)
|
if (!p)
|
||||||
return -ESRCH;
|
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 inode *inode = file->f_path.dentry->d_inode;
|
||||||
struct task_struct *p;
|
struct task_struct *p;
|
||||||
|
|
||||||
WARN_ON(!inode);
|
|
||||||
|
|
||||||
p = get_proc_task(inode);
|
p = get_proc_task(inode);
|
||||||
if (!p)
|
if (!p)
|
||||||
return -ESRCH;
|
return -ESRCH;
|
||||||
|
Loading…
Reference in New Issue
Block a user