Commit 82dab10453d65ad9ca551de5b8925673ca05c7e9

Authored by Eric Paris
Committed by James Morris
1 parent 4b61d12c84

security: remove dead hook sb_post_remount

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 26 deletions Side-by-side Diff

... ... @@ -1573,8 +1573,6 @@
1573 1573 }
1574 1574 up_write(&sb->s_umount);
1575 1575 if (!err) {
1576   - security_sb_post_remount(path->mnt, flags, data);
1577   -
1578 1576 spin_lock(&vfsmount_lock);
1579 1577 touch_mnt_namespace(path->mnt->mnt_ns);
1580 1578 spin_unlock(&vfsmount_lock);
include/linux/security.h
... ... @@ -272,12 +272,6 @@
272 272 * @mnt contains the mounted file system.
273 273 * @flags contains the unmount flags, e.g. MNT_FORCE.
274 274 * Return 0 if permission is granted.
275   - * @sb_post_remount:
276   - * Update the security module's state when a filesystem is remounted.
277   - * This hook is only called if the remount was successful.
278   - * @mnt contains the mounted file system.
279   - * @flags contains the new filesystem flags.
280   - * @data contains the filesystem-specific data.
281 275 * @sb_post_addmount:
282 276 * Update the security module's state when a filesystem is mounted.
283 277 * This hook is called any time a mount is successfully grafetd to
... ... @@ -1468,8 +1462,6 @@
1468 1462 int (*sb_mount) (char *dev_name, struct path *path,
1469 1463 char *type, unsigned long flags, void *data);
1470 1464 int (*sb_umount) (struct vfsmount *mnt, int flags);
1471   - void (*sb_post_remount) (struct vfsmount *mnt,
1472   - unsigned long flags, void *data);
1473 1465 void (*sb_post_addmount) (struct vfsmount *mnt,
1474 1466 struct path *mountpoint);
1475 1467 int (*sb_pivotroot) (struct path *old_path,
... ... @@ -1764,7 +1756,6 @@
1764 1756 int security_sb_mount(char *dev_name, struct path *path,
1765 1757 char *type, unsigned long flags, void *data);
1766 1758 int security_sb_umount(struct vfsmount *mnt, int flags);
1767   -void security_sb_post_remount(struct vfsmount *mnt, unsigned long flags, void *data);
1768 1759 void security_sb_post_addmount(struct vfsmount *mnt, struct path *mountpoint);
1769 1760 int security_sb_pivotroot(struct path *old_path, struct path *new_path);
1770 1761 void security_sb_post_pivotroot(struct path *old_path, struct path *new_path);
... ... @@ -2080,10 +2071,6 @@
2080 2071 {
2081 2072 return 0;
2082 2073 }
2083   -
2084   -static inline void security_sb_post_remount(struct vfsmount *mnt,
2085   - unsigned long flags, void *data)
2086   -{ }
2087 2074  
2088 2075 static inline void security_sb_post_addmount(struct vfsmount *mnt,
2089 2076 struct path *mountpoint)
security/capability.c
... ... @@ -85,11 +85,6 @@
85 85 return 0;
86 86 }
87 87  
88   -static void cap_sb_post_remount(struct vfsmount *mnt, unsigned long flags,
89   - void *data)
90   -{
91   -}
92   -
93 88 static void cap_sb_post_addmount(struct vfsmount *mnt, struct path *path)
94 89 {
95 90 }
... ... @@ -929,7 +924,6 @@
929 924 set_to_cap_if_null(ops, sb_statfs);
930 925 set_to_cap_if_null(ops, sb_mount);
931 926 set_to_cap_if_null(ops, sb_umount);
932   - set_to_cap_if_null(ops, sb_post_remount);
933 927 set_to_cap_if_null(ops, sb_post_addmount);
934 928 set_to_cap_if_null(ops, sb_pivotroot);
935 929 set_to_cap_if_null(ops, sb_post_pivotroot);
... ... @@ -311,11 +311,6 @@
311 311 return security_ops->sb_umount(mnt, flags);
312 312 }
313 313  
314   -void security_sb_post_remount(struct vfsmount *mnt, unsigned long flags, void *data)
315   -{
316   - security_ops->sb_post_remount(mnt, flags, data);
317   -}
318   -
319 314 void security_sb_post_addmount(struct vfsmount *mnt, struct path *mountpoint)
320 315 {
321 316 security_ops->sb_post_addmount(mnt, mountpoint);