Skip to contentSkip to conversation

apparmor: remove unused argument of aa_umount()

PATCH In review Austin Kim 3 participants 4 messages Aug 31, 2021 – Sep 4, 2021

Subsystems (2)
lore
Share & tools
lore

Austin Kim

author
#0 lore raw

PATCH 1/1 apparmor: remove unused argument of aa_umount()

The 'flags' argument in aa_umount() is not used,
so it had better remove unused argument.

---
 security/apparmor/include/mount.h | 2 +-
 security/apparmor/lsm.c           | 2 +-
 security/apparmor/mount.c         | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)
security/apparmor/include/mount.h +1 -1
index a710683b2496..9327456cda09 100644
@@ -42,7 +42,7 @@ int aa_new_mount(struct aa_label *label, const char *dev_name,
 		 const struct path *path, const char *type, unsigned long flags,
 		 void *data);
 
-int aa_umount(struct aa_label *label, struct vfsmount *mnt, int flags);
+int aa_umount(struct aa_label *label, struct vfsmount *mnt);
 
 int aa_pivotroot(struct aa_label *label, const struct path *old_path,
 		 const struct path *new_path);
security/apparmor/lsm.c +0 -0

Index 0834ba6a8a2e..58ba3f0605d2 100644

security/apparmor/lsm.c +1 -1
@@ -574,7 +574,7 @@ static int apparmor_sb_umount(struct vfsmount *mnt, int flags)
 
 	label = __begin_current_label_crit_section();
 	if (!unconfined(label))
-		error = aa_umount(label, mnt, flags);
+		error = aa_umount(label, mnt);
 	__end_current_label_crit_section(label);
 
 	return error;
security/apparmor/mount.c +1 -1
index aa6fcfde3051..e33de97839ec 100644
@@ -610,7 +610,7 @@ static int profile_umount(struct aa_profile *profile, const struct path *path,
 			   AA_MAY_UMOUNT, &perms, info, error);
 }
 
-int aa_umount(struct aa_label *label, struct vfsmount *mnt, int flags)
+int aa_umount(struct aa_label *label, struct vfsmount *mnt)
 {
 	struct aa_profile *profile;
 	char *buffer = NULL;
Signature · 1 line
2.20.1
maintainer Reviewed-by on v1 1/1
#1 lore raw
Quoted 2 lines · Austin Kim

The 'flags' argument in aa_umount() is not used,
so it had better remove unused argument.

Seems fine, thanks.

Quoted 48 lines
---
 security/apparmor/include/mount.h | 2 +-
 security/apparmor/lsm.c           | 2 +-
 security/apparmor/mount.c         | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)
security/apparmor/include/mount.h +1 -1
index a710683b2496..9327456cda09 100644
@@ -42,7 +42,7 @@ int aa_new_mount(struct aa_label *label, const char *dev_name,
 		 const struct path *path, const char *type, unsigned long flags,
 		 void *data);
 
-int aa_umount(struct aa_label *label, struct vfsmount *mnt, int flags);
+int aa_umount(struct aa_label *label, struct vfsmount *mnt);
 
 int aa_pivotroot(struct aa_label *label, const struct path *old_path,
 		 const struct path *new_path);
security/apparmor/lsm.c +0 -0

Index 0834ba6a8a2e..58ba3f0605d2 100644

security/apparmor/lsm.c +1 -1
@@ -574,7 +574,7 @@ static int apparmor_sb_umount(struct vfsmount *mnt, int flags)
 
 	label = __begin_current_label_crit_section();
 	if (!unconfined(label))
-		error = aa_umount(label, mnt, flags);
+		error = aa_umount(label, mnt);
 	__end_current_label_crit_section(label);
 
 	return error;
security/apparmor/mount.c +1 -1
index aa6fcfde3051..e33de97839ec 100644
@@ -610,7 +610,7 @@ static int profile_umount(struct aa_profile *profile, const struct path *path,
 			   AA_MAY_UMOUNT, &perms, info, error);
 }
 
-int aa_umount(struct aa_label *label, struct vfsmount *mnt, int flags)
+int aa_umount(struct aa_label *label, struct vfsmount *mnt)
 {
 	struct aa_profile *profile;
 	char *buffer = NULL;
Signature · 1 line
2.20.1
maintainer Acked-by on v1 1/1
#2 lore raw
In reply to Austin Kim
Quoted 4 lines · Austin Kim

The 'flags' argument in aa_umount() is not used,
so it had better remove unused argument.

looks good, I'll pull this into my tree

Quoted 46 lines
---
 security/apparmor/include/mount.h | 2 +-
 security/apparmor/lsm.c           | 2 +-
 security/apparmor/mount.c         | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)
security/apparmor/include/mount.h +1 -1
index a710683b2496..9327456cda09 100644
@@ -42,7 +42,7 @@ int aa_new_mount(struct aa_label *label, const char *dev_name,
 		 const struct path *path, const char *type, unsigned long flags,
 		 void *data);
 
-int aa_umount(struct aa_label *label, struct vfsmount *mnt, int flags);
+int aa_umount(struct aa_label *label, struct vfsmount *mnt);
 
 int aa_pivotroot(struct aa_label *label, const struct path *old_path,
 		 const struct path *new_path);
security/apparmor/lsm.c +0 -0

Index 0834ba6a8a2e..58ba3f0605d2 100644

security/apparmor/lsm.c +1 -1
@@ -574,7 +574,7 @@ static int apparmor_sb_umount(struct vfsmount *mnt, int flags)
 
 	label = __begin_current_label_crit_section();
 	if (!unconfined(label))
-		error = aa_umount(label, mnt, flags);
+		error = aa_umount(label, mnt);
 	__end_current_label_crit_section(label);
 
 	return error;
security/apparmor/mount.c +1 -1
index aa6fcfde3051..e33de97839ec 100644
@@ -610,7 +610,7 @@ static int profile_umount(struct aa_profile *profile, const struct path *path,
 			   AA_MAY_UMOUNT, &perms, info, error);
 }
 
-int aa_umount(struct aa_label *label, struct vfsmount *mnt, int flags)
+int aa_umount(struct aa_label *label, struct vfsmount *mnt)
 {
 	struct aa_profile *profile;
 	char *buffer = NULL;
author
#3 lore raw

2021년 9월 4일 (토) 오전 8:30, John Johansen <[email protected]>님이 작성:

Quoted 8 lines · Austin Kim
Quoted 4 lines

The 'flags' argument in aa_umount() is not used,
so it had better remove unused argument.

looks good, I'll pull this into my tree

Great, thanks!

Quoted 50 lines
Quoted 46 lines
---
 security/apparmor/include/mount.h | 2 +-
 security/apparmor/lsm.c           | 2 +-
 security/apparmor/mount.c         | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)
security/apparmor/include/mount.h +1 -1
index a710683b2496..9327456cda09 100644
@@ -42,7 +42,7 @@ int aa_new_mount(struct aa_label *label, const char *dev_name,
               const struct path *path, const char *type, unsigned long flags,
               void *data);
 
-int aa_umount(struct aa_label *label, struct vfsmount *mnt, int flags);
+int aa_umount(struct aa_label *label, struct vfsmount *mnt);
 
 int aa_pivotroot(struct aa_label *label, const struct path *old_path,
               const struct path *new_path);
security/apparmor/lsm.c +0 -0

Index 0834ba6a8a2e..58ba3f0605d2 100644

security/apparmor/lsm.c +1 -1
@@ -574,7 +574,7 @@ static int apparmor_sb_umount(struct vfsmount *mnt, int flags)
 
      label = __begin_current_label_crit_section();
      if (!unconfined(label))
-             error = aa_umount(label, mnt, flags);
+             error = aa_umount(label, mnt);
      __end_current_label_crit_section(label);
 
      return error;
security/apparmor/mount.c +1 -1
index aa6fcfde3051..e33de97839ec 100644
@@ -610,7 +610,7 @@ static int profile_umount(struct aa_profile *profile, const struct path *path,
                         AA_MAY_UMOUNT, &perms, info, error);
 }
 
-int aa_umount(struct aa_label *label, struct vfsmount *mnt, int flags)
+int aa_umount(struct aa_label *label, struct vfsmount *mnt)
 {
      struct aa_profile *profile;
      char *buffer = NULL;