Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 267e2a9c authored by Arjan van de Ven's avatar Arjan van de Ven Committed by Linus Torvalds
Browse files

Use WARN() in fs/proc/



Use WARN() instead of a printk+WARN_ON() pair; this way the message
becomes part of the warning section for better reporting/collection.
This way, the entire if() {} section can collapse into the WARN() as well.

Signed-off-by: default avatarArjan van de Ven <arjan@linux.intel.com>
Acked-by: default avatarAlexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 99fcd77d
Loading
Loading
Loading
Loading
+1 −4
Original line number Diff line number Diff line
@@ -806,12 +806,9 @@ continue_removing:
	if (S_ISDIR(de->mode))
		parent->nlink--;
	de->nlink = 0;
	if (de->subdir) {
		printk(KERN_WARNING "%s: removing non-empty directory "
	WARN(de->subdir, KERN_WARNING "%s: removing non-empty directory "
			"'%s/%s', leaking at least '%s'\n", __func__,
			de->parent->name, de->name, de->subdir->name);
		WARN_ON(1);
	}
	if (atomic_dec_and_test(&de->count))
		free_proc_entry(de);
}