OSDN Git Service

Revert "security: inode: fix a missing check for securityfs_create_file"
authorJames Morris <james.morris@microsoft.com>
Wed, 10 Apr 2019 21:59:20 +0000 (14:59 -0700)
committerJames Morris <james.morris@microsoft.com>
Wed, 10 Apr 2019 21:59:20 +0000 (14:59 -0700)
commitfe9fd2ef383c2f5883fcd3f7adce0de9ce2556ff
treec364553ccf78c5356050fe6d3b5a60da9927af2c
parentecb8e74dac1aaeea4005c9d8f21337f9423f3d8b
Revert "security: inode: fix a missing check for securityfs_create_file"

This reverts commit d1a0846006e4325cc951ca0b05c02ed1d0865006.

From Al Viro:

"Rather bad way to do it - generally, register_filesystem() should be
the last thing done by initialization.  Any modular code that
does unregister_filesystem() on failure exit is flat-out broken;
here it's not instantly FUBAR, but it's a bloody bad example.

What's more, why not let simple_fill_super() do it?  Just
static int fill_super(struct super_block *sb, void *data, int silent)
{
        static const struct tree_descr files[] = {
                {"lsm", &lsm_ops, 0444},
                {""}
        };

and to hell with that call of securityfs_create_file() and all its
failure handling..."

Signed-off-by: James Morris <james.morris@microsoft.com>
security/inode.c