]> err.no Git - linux-2.6/commitdiff
proc: remove pathetic ->deleted WARN_ON
authorAlexey Dobriyan <adobriyan@sw.ru>
Tue, 8 May 2007 07:25:49 +0000 (00:25 -0700)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Tue, 8 May 2007 18:15:02 +0000 (11:15 -0700)
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 <adobriyan@sw.ru>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/proc/inode.c

index d1de6378930c87aeb10fb645b75e8db37ce0ff98..b8171907c83b64e30ce98bf6553c7feff60768e1 100644 (file)
@@ -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;