]> git.ipfire.org Git - thirdparty/linux.git/commit
debugfs: Remove redundant access mode checks
authorAaron Thompson <dev@aaront.org>
Thu, 20 Nov 2025 10:26:32 +0000 (10:26 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 27 Nov 2025 09:45:20 +0000 (10:45 +0100)
commit3ae94a55d047d133fad1e6c811befe4347b75791
treed5e3f84f31cd427fa441f972f3bed45addd16128
parentea34511aaf755349999a1067b2984a541bee1492
debugfs: Remove redundant access mode checks

debugfs_get_tree() can only be called if debugfs itself calls
simple_pin_fs() or register_filesystem(), and those call paths also
check the access mode.

debugfs_start_creating() checks the access mode so the checks in the
debugfs_create_* functions are unnecessary.

An upcoming change will affect debugfs_allow, so doing this cleanup
first will make that change simpler.

Signed-off-by: Aaron Thompson <dev@aaront.org>
Link: https://patch.msgid.link/20251120102222.18371-2-dev@null.aaront.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/debugfs/inode.c