]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commitdiff
ceph: turn ceph_security_invalidate_secctx into static inline
authorJeff Layton <jlayton@kernel.org>
Tue, 6 Aug 2019 13:07:51 +0000 (09:07 -0400)
committerIlya Dryomov <idryomov@gmail.com>
Mon, 16 Sep 2019 10:06:25 +0000 (12:06 +0200)
No need to do an extra jump here. Also add some comments on the endifs.

Signed-off-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
fs/ceph/super.h
fs/ceph/xattr.c

index 98d7190289c847e7c9cf1169a2eab2f6ffc88e26..f98d9247f9cb48fd3c3affd6745287a76b401927 100644 (file)
@@ -16,6 +16,7 @@
 #include <linux/slab.h>
 #include <linux/posix_acl.h>
 #include <linux/refcount.h>
+#include <linux/security.h>
 
 #include <linux/ceph/libceph.h>
 
@@ -971,7 +972,10 @@ static inline bool ceph_security_xattr_wanted(struct inode *in)
 #ifdef CONFIG_CEPH_FS_SECURITY_LABEL
 extern int ceph_security_init_secctx(struct dentry *dentry, umode_t mode,
                                     struct ceph_acl_sec_ctx *ctx);
-extern void ceph_security_invalidate_secctx(struct inode *inode);
+static inline void ceph_security_invalidate_secctx(struct inode *inode)
+{
+       security_inode_invalidate_secctx(inode);
+}
 #else
 static inline int ceph_security_init_secctx(struct dentry *dentry, umode_t mode,
                                            struct ceph_acl_sec_ctx *ctx)
index 2fba06b50f25eaa4e3901f2d5dcc8a693f0df60b..5c608caf0190b2e5d65c6e16195f35c84876e03f 100644 (file)
@@ -1265,11 +1265,6 @@ out:
        return err;
 }
 
-void ceph_security_invalidate_secctx(struct inode *inode)
-{
-       security_inode_invalidate_secctx(inode);
-}
-
 static int ceph_xattr_set_security_label(const struct xattr_handler *handler,
                                    struct dentry *unused, struct inode *inode,
                                    const char *key, const void *buf,
@@ -1298,8 +1293,8 @@ static const struct xattr_handler ceph_security_label_handler = {
        .get    = ceph_xattr_get_security_label,
        .set    = ceph_xattr_set_security_label,
 };
-#endif
-#endif
+#endif /* CONFIG_CEPH_FS_SECURITY_LABEL */
+#endif /* CONFIG_SECURITY */
 
 void ceph_release_acl_sec_ctx(struct ceph_acl_sec_ctx *as_ctx)
 {