Commit 0c7cdf44 authored by Steve Langasek's avatar Steve Langasek
Browse files

Fix a regression introduced in 2.41: parse_mountinfo() doesn't

generate a mounted event for a filesystem whose canonicalized
mountpoint doesn't match the mountpoint specified in /etc/fstab.  So
we still need to call mounted() explicitly for this case.  LP: #1059471.
parent 726c0879
mountall (2.43) UNRELEASED; urgency=low
* Fix a regression introduced in 2.41: parse_mountinfo() doesn't
generate a mounted event for a filesystem whose canonicalized
mountpoint doesn't match the mountpoint specified in /etc/fstab. So
we still need to call mounted() explicitly for this case. LP: #1059471.
-- Steve Langasek <steve.langasek@ubuntu.com> Tue, 06 Nov 2012 08:18:08 +0000
mountall (2.42) unstable; urgency=low mountall (2.42) unstable; urgency=low
[ Andy Whitcroft ] [ Andy Whitcroft ]
......
...@@ -920,7 +920,7 @@ parse_mountinfo_file (int reparsed) ...@@ -920,7 +920,7 @@ parse_mountinfo_file (int reparsed)
* If invoked first time, just set the flag and leave complete * If invoked first time, just set the flag and leave complete
* state update (including event trigger) to mark_mounted (). * state update (including event trigger) to mark_mounted ().
*/ */
if (reparsed) { if (reparsed && ! mnt->pending_call) {
mounted (mnt); mounted (mnt);
} else { } else {
mnt->mounted = TRUE; mnt->mounted = TRUE;
...@@ -2306,9 +2306,19 @@ run_mount_finished (Mount *mnt, ...@@ -2306,9 +2306,19 @@ run_mount_finished (Mount *mnt,
/* Parse mountinfo to see what mount did; in particular to update /* Parse mountinfo to see what mount did; in particular to update
* the type if multiple types are listed in fstab. * the type if multiple types are listed in fstab.
* Let parse_mountinfo () invoke mounted () to update state.
*/ */
parse_mountinfo (); if (! mnt->mounted) {
parse_mountinfo ();
/* If the canonical path of the mount point doesn't match
* what's in the fstab, reparsing /proc/mounts won't change
* this mount but instead create a new record. So handle
* this case directly here.
*/
if (! mnt->mounted && ! mnt->pending_call)
mounted (mnt);
} else {
mounted (mnt);
}
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment