security: remove dead hook inode_delete
Unused hook. Remove. Signed-off-by: Eric Paris <eparis@redhat.com> Signed-off-by: James Morris <jmorris@namei.org>
This commit is contained in:
parent
91a9420f58
commit
9d5ed77dad
4 changed files with 0 additions and 25 deletions
|
@ -1205,8 +1205,6 @@ void generic_delete_inode(struct inode *inode)
|
||||||
inodes_stat.nr_inodes--;
|
inodes_stat.nr_inodes--;
|
||||||
spin_unlock(&inode_lock);
|
spin_unlock(&inode_lock);
|
||||||
|
|
||||||
security_inode_delete(inode);
|
|
||||||
|
|
||||||
if (op->delete_inode) {
|
if (op->delete_inode) {
|
||||||
void (*delete)(struct inode *) = op->delete_inode;
|
void (*delete)(struct inode *) = op->delete_inode;
|
||||||
/* Filesystems implementing their own
|
/* Filesystems implementing their own
|
||||||
|
|
|
@ -478,12 +478,6 @@ static inline void security_free_mnt_opts(struct security_mnt_opts *opts)
|
||||||
* @mnt is the vfsmount where the dentry was looked up
|
* @mnt is the vfsmount where the dentry was looked up
|
||||||
* @dentry contains the dentry structure for the file.
|
* @dentry contains the dentry structure for the file.
|
||||||
* Return 0 if permission is granted.
|
* Return 0 if permission is granted.
|
||||||
* @inode_delete:
|
|
||||||
* @inode contains the inode structure for deleted inode.
|
|
||||||
* This hook is called when a deleted inode is released (i.e. an inode
|
|
||||||
* with no hard links has its use count drop to zero). A security module
|
|
||||||
* can use this hook to release any persistent label associated with the
|
|
||||||
* inode.
|
|
||||||
* @inode_setxattr:
|
* @inode_setxattr:
|
||||||
* Check permission before setting the extended attributes
|
* Check permission before setting the extended attributes
|
||||||
* @value identified by @name for @dentry.
|
* @value identified by @name for @dentry.
|
||||||
|
@ -1502,7 +1496,6 @@ struct security_operations {
|
||||||
int (*inode_permission) (struct inode *inode, int mask);
|
int (*inode_permission) (struct inode *inode, int mask);
|
||||||
int (*inode_setattr) (struct dentry *dentry, struct iattr *attr);
|
int (*inode_setattr) (struct dentry *dentry, struct iattr *attr);
|
||||||
int (*inode_getattr) (struct vfsmount *mnt, struct dentry *dentry);
|
int (*inode_getattr) (struct vfsmount *mnt, struct dentry *dentry);
|
||||||
void (*inode_delete) (struct inode *inode);
|
|
||||||
int (*inode_setxattr) (struct dentry *dentry, const char *name,
|
int (*inode_setxattr) (struct dentry *dentry, const char *name,
|
||||||
const void *value, size_t size, int flags);
|
const void *value, size_t size, int flags);
|
||||||
void (*inode_post_setxattr) (struct dentry *dentry, const char *name,
|
void (*inode_post_setxattr) (struct dentry *dentry, const char *name,
|
||||||
|
@ -1768,7 +1761,6 @@ int security_inode_follow_link(struct dentry *dentry, struct nameidata *nd);
|
||||||
int security_inode_permission(struct inode *inode, int mask);
|
int security_inode_permission(struct inode *inode, int mask);
|
||||||
int security_inode_setattr(struct dentry *dentry, struct iattr *attr);
|
int security_inode_setattr(struct dentry *dentry, struct iattr *attr);
|
||||||
int security_inode_getattr(struct vfsmount *mnt, struct dentry *dentry);
|
int security_inode_getattr(struct vfsmount *mnt, struct dentry *dentry);
|
||||||
void security_inode_delete(struct inode *inode);
|
|
||||||
int security_inode_setxattr(struct dentry *dentry, const char *name,
|
int security_inode_setxattr(struct dentry *dentry, const char *name,
|
||||||
const void *value, size_t size, int flags);
|
const void *value, size_t size, int flags);
|
||||||
void security_inode_post_setxattr(struct dentry *dentry, const char *name,
|
void security_inode_post_setxattr(struct dentry *dentry, const char *name,
|
||||||
|
@ -2177,9 +2169,6 @@ static inline int security_inode_getattr(struct vfsmount *mnt,
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void security_inode_delete(struct inode *inode)
|
|
||||||
{ }
|
|
||||||
|
|
||||||
static inline int security_inode_setxattr(struct dentry *dentry,
|
static inline int security_inode_setxattr(struct dentry *dentry,
|
||||||
const char *name, const void *value, size_t size, int flags)
|
const char *name, const void *value, size_t size, int flags)
|
||||||
{
|
{
|
||||||
|
|
|
@ -195,10 +195,6 @@ static int cap_inode_getattr(struct vfsmount *mnt, struct dentry *dentry)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void cap_inode_delete(struct inode *ino)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
static void cap_inode_post_setxattr(struct dentry *dentry, const char *name,
|
static void cap_inode_post_setxattr(struct dentry *dentry, const char *name,
|
||||||
const void *value, size_t size, int flags)
|
const void *value, size_t size, int flags)
|
||||||
{
|
{
|
||||||
|
@ -936,7 +932,6 @@ void security_fixup_ops(struct security_operations *ops)
|
||||||
set_to_cap_if_null(ops, inode_permission);
|
set_to_cap_if_null(ops, inode_permission);
|
||||||
set_to_cap_if_null(ops, inode_setattr);
|
set_to_cap_if_null(ops, inode_setattr);
|
||||||
set_to_cap_if_null(ops, inode_getattr);
|
set_to_cap_if_null(ops, inode_getattr);
|
||||||
set_to_cap_if_null(ops, inode_delete);
|
|
||||||
set_to_cap_if_null(ops, inode_setxattr);
|
set_to_cap_if_null(ops, inode_setxattr);
|
||||||
set_to_cap_if_null(ops, inode_post_setxattr);
|
set_to_cap_if_null(ops, inode_post_setxattr);
|
||||||
set_to_cap_if_null(ops, inode_getxattr);
|
set_to_cap_if_null(ops, inode_getxattr);
|
||||||
|
|
|
@ -550,13 +550,6 @@ int security_inode_getattr(struct vfsmount *mnt, struct dentry *dentry)
|
||||||
return security_ops->inode_getattr(mnt, dentry);
|
return security_ops->inode_getattr(mnt, dentry);
|
||||||
}
|
}
|
||||||
|
|
||||||
void security_inode_delete(struct inode *inode)
|
|
||||||
{
|
|
||||||
if (unlikely(IS_PRIVATE(inode)))
|
|
||||||
return;
|
|
||||||
security_ops->inode_delete(inode);
|
|
||||||
}
|
|
||||||
|
|
||||||
int security_inode_setxattr(struct dentry *dentry, const char *name,
|
int security_inode_setxattr(struct dentry *dentry, const char *name,
|
||||||
const void *value, size_t size, int flags)
|
const void *value, size_t size, int flags)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue