kernfs: Declare two local data structures static
authorBart Van Assche <bart.vanassche@sandisk.com>
Sat, 12 Nov 2016 00:45:58 +0000 (16:45 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 29 Nov 2016 19:58:31 +0000 (20:58 +0100)
This was spotted by the 'sparse' static checker.

Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com>
Cc: Andreas Gruenbacher <agruenba@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/kernfs/inode.c

index a1982118f92f4277be200fa439c3fc8f1e3c24af..ac9e108ce1eacb7020f4af1c4ee8ec949c84ff51 100644 (file)
@@ -335,7 +335,7 @@ static int kernfs_xattr_set(const struct xattr_handler *handler,
        return simple_xattr_set(&attrs->xattrs, name, value, size, flags);
 }
 
-const struct xattr_handler kernfs_trusted_xattr_handler = {
+static const struct xattr_handler kernfs_trusted_xattr_handler = {
        .prefix = XATTR_TRUSTED_PREFIX,
        .get = kernfs_xattr_get,
        .set = kernfs_xattr_set,
@@ -372,7 +372,7 @@ static int kernfs_security_xattr_set(const struct xattr_handler *handler,
        return error;
 }
 
-const struct xattr_handler kernfs_security_xattr_handler = {
+static const struct xattr_handler kernfs_security_xattr_handler = {
        .prefix = XATTR_SECURITY_PREFIX,
        .get = kernfs_xattr_get,
        .set = kernfs_security_xattr_set,