Skip to contentSkip to conversation

mount_ext2 forgets MOUNTED_LOCK in spawnl

PATCH In review Jeff Moyer 2 participants 2 messages Apr 20, 2004 Kernel automounter

lore
Share & tools
lore

Jeff Moyer

author
#0 lore raw

PATCH 1/1 mount_ext2 forgets MOUNTED_LOCK in spawnl

Hi Ian,

Seems you missed an option to spawnl for the ext2 fsck call. Nils Philipp found (and fixed) this bug while trying to automount filesystems on loop devices.

-Jeff

modules/mount_ext2.c renamed from modules/mount_ext2.c.ext2 +2 -2
@@ -87,10 +87,10 @@
 #endif
 	if (ro) {
 		debug(MODPREFIX "calling %s -n %s", fsck_prog, what);
-		err = spawnl(LOG_DEBUG, fsck_prog, fsck_prog, "-n", what, NULL);
+		err = spawnl(LOG_DEBUG, MOUNTED_LOCK, fsck_prog, fsck_prog, "-n", what, NULL);
 	} else {
 		debug(MODPREFIX "calling %s -p %s", fsck_prog, what);
-		err = spawnl(LOG_DEBUG, fsck_prog, fsck_prog, "-p", what, NULL);
+		err = spawnl(LOG_DEBUG, MOUNTED_LOCK, fsck_prog, fsck_prog, "-p", what, NULL);
 	}
 
 	if (err & ~6) {
#1 lore raw
Quoted 6 lines · Jeff Moyer

Hi Ian,

Seems you missed an option to spawnl for the ext2 fsck call. Nils Philipp found (and fixed) this bug while trying to automount filesystems on loop devices.

Oops, that's kind of broken.

Ian