Skip to contentSkip to conversation

bryce commits r1573 - in trunk: . mount.ocfs

Ocfs2-devel Christoph Hellwig 2 participants 2 messages Oct 14, 2004 – Oct 15, 2004 1 message not in the archive OCFS2

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw
Quoted 6 lines
(quoted diff) +6 -0
+int module_loaded(char * module) {
+	int fd;
+	int i;
+	char line[100];
+
+	if ((fd = open("/proc/modules", O_RDONLY)) >= 0 ) {

Review

Quoted 10 lines
(quoted diff) +10 -0
+                        while ((i = read(fd, line, 100)) > 0) {
+                                if (strstr(line, module) != 0) {
+					close(fd);
+					return (1);
+				}
+                        close(fd);
+                        return (0);
+                }
+	}
+}

this check is bogus, the kernel will autload a filesystem on the first mount attempt.

#2 lore raw
Quoted 3 lines · Christoph Hellwig
Quoted 1 line

+int module_loaded(char * module) {

this check is bogus, the kernel will autload a filesystem on the first mount attempt.

Not if the module fails to load without magic module parameters,
as OCFS2 still does.

Joel

Signature · 9 lines
"Can any of you seriously say the Bill of Rights could get through
 Congress today?  It wouldn't even get out of committee."
	- F. Lee Bailey

Joel Becker
Senior Member of Technical Staff
Oracle Corporation
E-mail: [email protected]
Phone: (650) 506-8127