Commit 9d5ed77dadc66a72b40419c91df942adfa55a102
Committed by
James Morris
1 parent
91a9420f58
Exists in
master
and in
7 other branches
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>
Showing 4 changed files with 0 additions and 25 deletions Side-by-side Diff
fs/inode.c
include/linux/security.h
... | ... | @@ -478,12 +478,6 @@ |
478 | 478 | * @mnt is the vfsmount where the dentry was looked up |
479 | 479 | * @dentry contains the dentry structure for the file. |
480 | 480 | * Return 0 if permission is granted. |
481 | - * @inode_delete: | |
482 | - * @inode contains the inode structure for deleted inode. | |
483 | - * This hook is called when a deleted inode is released (i.e. an inode | |
484 | - * with no hard links has its use count drop to zero). A security module | |
485 | - * can use this hook to release any persistent label associated with the | |
486 | - * inode. | |
487 | 481 | * @inode_setxattr: |
488 | 482 | * Check permission before setting the extended attributes |
489 | 483 | * @value identified by @name for @dentry. |
... | ... | @@ -1502,7 +1496,6 @@ |
1502 | 1496 | int (*inode_permission) (struct inode *inode, int mask); |
1503 | 1497 | int (*inode_setattr) (struct dentry *dentry, struct iattr *attr); |
1504 | 1498 | int (*inode_getattr) (struct vfsmount *mnt, struct dentry *dentry); |
1505 | - void (*inode_delete) (struct inode *inode); | |
1506 | 1499 | int (*inode_setxattr) (struct dentry *dentry, const char *name, |
1507 | 1500 | const void *value, size_t size, int flags); |
1508 | 1501 | void (*inode_post_setxattr) (struct dentry *dentry, const char *name, |
... | ... | @@ -1768,7 +1761,6 @@ |
1768 | 1761 | int security_inode_permission(struct inode *inode, int mask); |
1769 | 1762 | int security_inode_setattr(struct dentry *dentry, struct iattr *attr); |
1770 | 1763 | int security_inode_getattr(struct vfsmount *mnt, struct dentry *dentry); |
1771 | -void security_inode_delete(struct inode *inode); | |
1772 | 1764 | int security_inode_setxattr(struct dentry *dentry, const char *name, |
1773 | 1765 | const void *value, size_t size, int flags); |
1774 | 1766 | void security_inode_post_setxattr(struct dentry *dentry, const char *name, |
... | ... | @@ -2176,9 +2168,6 @@ |
2176 | 2168 | { |
2177 | 2169 | return 0; |
2178 | 2170 | } |
2179 | - | |
2180 | -static inline void security_inode_delete(struct inode *inode) | |
2181 | -{ } | |
2182 | 2171 | |
2183 | 2172 | static inline int security_inode_setxattr(struct dentry *dentry, |
2184 | 2173 | const char *name, const void *value, size_t size, int flags) |
security/capability.c
... | ... | @@ -195,10 +195,6 @@ |
195 | 195 | return 0; |
196 | 196 | } |
197 | 197 | |
198 | -static void cap_inode_delete(struct inode *ino) | |
199 | -{ | |
200 | -} | |
201 | - | |
202 | 198 | static void cap_inode_post_setxattr(struct dentry *dentry, const char *name, |
203 | 199 | const void *value, size_t size, int flags) |
204 | 200 | { |
... | ... | @@ -936,7 +932,6 @@ |
936 | 932 | set_to_cap_if_null(ops, inode_permission); |
937 | 933 | set_to_cap_if_null(ops, inode_setattr); |
938 | 934 | set_to_cap_if_null(ops, inode_getattr); |
939 | - set_to_cap_if_null(ops, inode_delete); | |
940 | 935 | set_to_cap_if_null(ops, inode_setxattr); |
941 | 936 | set_to_cap_if_null(ops, inode_post_setxattr); |
942 | 937 | set_to_cap_if_null(ops, inode_getxattr); |
security/security.c
... | ... | @@ -550,13 +550,6 @@ |
550 | 550 | return security_ops->inode_getattr(mnt, dentry); |
551 | 551 | } |
552 | 552 | |
553 | -void security_inode_delete(struct inode *inode) | |
554 | -{ | |
555 | - if (unlikely(IS_PRIVATE(inode))) | |
556 | - return; | |
557 | - security_ops->inode_delete(inode); | |
558 | -} | |
559 | - | |
560 | 553 | int security_inode_setxattr(struct dentry *dentry, const char *name, |
561 | 554 | const void *value, size_t size, int flags) |
562 | 555 | { |