debugfs: Fix module state check condition
authorVladis Dronov <vdronov@redhat.com>
Tue, 11 Aug 2020 15:01:29 +0000 (17:01 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 17 Sep 2020 11:55:44 +0000 (13:55 +0200)
commit46230cc3ff269a09ea86df8b1ea6d90db6758cf8
tree6dcb62a4483bcba61fa8edcb6147bc6d0e7df3e4
parentbf4c17b74472e5c9e9793c054af71dff62650be5
debugfs: Fix module state check condition

commit e3b9fc7eec55e6fdc8beeed18f2ed207086341e2 upstream.

The '#ifdef MODULE' check in the original commit does not work as intended.
The code under the check is not built at all if CONFIG_DEBUG_FS=y. Fix this
by using a correct check.

Fixes: 275678e7a9be ("debugfs: Check module state before warning in {full/open}_proxy_open()")
Signed-off-by: Vladis Dronov <vdronov@redhat.com>
Cc: stable <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20200811150129.53343-1-vdronov@redhat.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/debugfs/file.c