]>
Commit | Line | Data |
---|---|---|
e5fd101c PS |
1 | autofs-5.0.4 - remount we created mount point fix |
2 | ||
3 | From: Ian Kent <raven@themaw.net> | |
4 | ||
5 | During remount determine if autofs created the mount point directory, | |
6 | as best we can. | |
7 | --- | |
8 | ||
9 | CHANGELOG | 1 + | |
10 | lib/mounts.c | 15 +++++++-------- | |
11 | 2 files changed, 8 insertions(+), 8 deletions(-) | |
12 | ||
13 | ||
14 | diff --git a/CHANGELOG b/CHANGELOG | |
15 | index 0a0519f..e138ca3 100644 | |
16 | --- a/CHANGELOG | |
17 | +++ b/CHANGELOG | |
18 | @@ -52,6 +52,7 @@ | |
19 | - use srv query for domain dn. | |
20 | - fix not releasing resources when using submounts. | |
21 | - fix notify mount message path. | |
22 | +- remount we created mount point fix. | |
23 | ||
24 | 4/11/2008 autofs-5.0.4 | |
25 | ----------------------- | |
26 | diff --git a/lib/mounts.c b/lib/mounts.c | |
27 | index 4787bb6..4c44982 100644 | |
28 | --- a/lib/mounts.c | |
29 | +++ b/lib/mounts.c | |
30 | @@ -1359,18 +1359,17 @@ int try_remount(struct autofs_point *ap, struct mapent *me, unsigned int type) | |
31 | /* | |
32 | * The directory must exist since we found a device | |
33 | * number for the mount but we can't know if we created | |
34 | - * it or not. However, if we're mounted on an autofs fs | |
35 | - * then we need to cleanup the path anyway. | |
36 | + * it or not. However, if this is an indirect mount with | |
37 | + * the nobrowse option we need to remove the mount point | |
38 | + * directory at umount anyway. | |
39 | */ | |
40 | if (type == t_indirect) { | |
41 | - ap->flags &= ~MOUNT_FLAG_DIR_CREATED; | |
42 | - if (ret == DEV_IOCTL_IS_AUTOFS) | |
43 | + if (ap->flags & MOUNT_FLAG_GHOST) | |
44 | + ap->flags &= ~MOUNT_FLAG_DIR_CREATED; | |
45 | + else | |
46 | ap->flags |= MOUNT_FLAG_DIR_CREATED; | |
47 | - } else { | |
48 | + } else | |
49 | me->flags &= ~MOUNT_FLAG_DIR_CREATED; | |
50 | - if (ret == DEV_IOCTL_IS_AUTOFS) | |
51 | - me->flags |= MOUNT_FLAG_DIR_CREATED; | |
52 | - } | |
53 | ||
54 | /* | |
55 | * Either we opened the mount or we're re-reading the map. |