From: Alexey Dobriyan Date: Tue, 8 May 2007 07:25:49 +0000 (-0700) Subject: proc: remove pathetic ->deleted WARN_ON X-Git-Tag: v2.6.22-rc1~756 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=578c8183c116e623d53b05d4c79762d053c7090f;p=linux-2.6 proc: remove pathetic ->deleted WARN_ON WARN_ON(de && de->deleted); is sooo unreliable. Why? proc_lookup remove_proc_entry =========== ================= lock_kernel(); spin_lock(&proc_subdir_lock); [find proc entry] spin_unlock(&proc_subdir_lock); spin_lock(&proc_subdir_lock); [find proc entry] proc_get_inode ============== WARN_ON(de && de->deleted); ... if (!atomic_read(&de->count)) free_proc_entry(de); else de->deleted = 1; So, if you have some strange oops [1], and doesn't see this WARN_ON it means nothing. [1] try_module_get() of module which doesn't exist, two lines below should suffice, or not? Signed-off-by: Alexey Dobriyan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/fs/proc/inode.c b/fs/proc/inode.c index d1de637893..b8171907c8 100644 --- a/fs/proc/inode.c +++ b/fs/proc/inode.c @@ -146,8 +146,6 @@ struct inode *proc_get_inode(struct super_block *sb, unsigned int ino, { struct inode * inode; - WARN_ON(de && de->deleted); - if (de != NULL && !try_module_get(de->owner)) goto out_mod;