autofs/autofs-5.1.7-simplify-mount_subtree-mount-check.patch
DistroBaker a5adb69dac Merged update from upstream sources
This is an automated DistroBaker update from upstream sources.
If you do not know what this is about or would like to opt out,
contact the OSCI team.

Source: https://src.fedoraproject.org/rpms/autofs.git#25aaf0b69441b4e7370a195cbf1c7988d0abef3d
2021-03-26 02:05:45 +00:00

47 lines
1.4 KiB
Diff

autofs-5.1.7 - simplify mount_subtree() mount check
From: Ian Kent <raven@themaw.net>
The check of the return from sun_mount() following the possible mount
of the root offset in mount_subtree() can be simpler.
Signed-off-by: Ian Kent <raven@themaw.net>
---
CHANGELOG | 1 +
modules/parse_sun.c | 10 +---------
2 files changed, 2 insertions(+), 9 deletions(-)
diff --git a/CHANGELOG b/CHANGELOG
index b1ce7b69..f5c5641a 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -13,6 +13,7 @@
- remove unused parameter form do_mount_autofs_offset().
- refactor umount_multi_triggers().
- eliminate clean_stale_multi_triggers().
+- simplify mount_subtree() mount check.
25/01/2021 autofs-5.1.7
- make bind mounts propagation slave by default.
diff --git a/modules/parse_sun.c b/modules/parse_sun.c
index f4d5125c..1142e8a3 100644
--- a/modules/parse_sun.c
+++ b/modules/parse_sun.c
@@ -1203,15 +1203,7 @@ static int mount_subtree(struct autofs_point *ap, struct mapent *me,
free(ro_loc);
}
- if (ro && rv == 0) {
- ret = mount_multi_triggers(ap, me, mm_root, start, mm_base);
- if (ret == -1) {
- error(ap->logopt, MODPREFIX
- "failed to mount offset triggers");
- cleanup_multi_triggers(ap, me, mm_root, start, mm_base);
- return 1;
- }
- } else if (rv <= 0) {
+ if ((ro && rv == 0) || rv <= 0) {
ret = mount_multi_triggers(ap, me, mm_root, start, mm_base);
if (ret == -1) {
error(ap->logopt, MODPREFIX