ceph: turn ceph_security_invalidate_secctx into static inline
diff mbox series

Message ID 20190806175738.5407-1-jlayton@kernel.org
State New
Headers show
Series
  • ceph: turn ceph_security_invalidate_secctx into static inline
Related show

Commit Message

Jeff Layton Aug. 6, 2019, 5:57 p.m. UTC
No need to do an extra jump here. Also add some comments on the endifs.

Signed-off-by: Jeff Layton <jlayton@kernel.org>
---
 fs/ceph/super.h | 5 ++++-
 fs/ceph/xattr.c | 9 ++-------
 2 files changed, 6 insertions(+), 8 deletions(-)

Patch
diff mbox series

diff --git a/fs/ceph/super.h b/fs/ceph/super.h
index 98d7190289c8..bb5d02c2cd4d 100644
--- a/fs/ceph/super.h
+++ b/fs/ceph/super.h
@@ -971,7 +971,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)
diff --git a/fs/ceph/xattr.c b/fs/ceph/xattr.c
index 2fba06b50f25..5c608caf0190 100644
--- a/fs/ceph/xattr.c
+++ b/fs/ceph/xattr.c
@@ -1265,11 +1265,6 @@  int ceph_security_init_secctx(struct dentry *dentry, umode_t mode,
 	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)
 {