Christoph Hellwig
2004-Oct-14 13:50 UTC
[Ocfs2-devel] Re: [Ocfs2-commits] bryce commits r1573 - in trunk: . mount.ocfs
> +int module_loaded(char * module) { > + int fd; > + int i; > + char line[100]; > + > + if ((fd = open("/proc/modules", O_RDONLY)) >= 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.
Joel Becker
2004-Oct-15 22:44 UTC
[Ocfs2-devel] Re: [Ocfs2-commits] bryce commits r1573 - in trunk: . mount.ocfs
On Thu, Oct 14, 2004 at 08:50:29PM +0200, Christoph Hellwig wrote:> > +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 -- "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: joel.becker@oracle.com Phone: (650) 506-8127