From mboxrd@z Thu Jan 1 00:00:00 1970 From: rpeterso@sourceware.org Date: 14 May 2007 19:08:44 -0000 Subject: [Cluster-devel] cluster/gfs2/mount mount.gfs2.c Message-ID: <20070514190844.5088.qmail@sourceware.org> List-Id: To: cluster-devel.redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit CVSROOT: /cvs/cluster Module name: cluster Branch: RHEL5 Changes by: rpeterso at sourceware.org 2007-05-14 19:08:43 Modified files: gfs2/mount : mount.gfs2.c Log message: Close the /sys/fs directory after using it. Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs2/mount/mount.gfs2.c.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.20.2.2&r2=1.20.2.3 --- cluster/gfs2/mount/mount.gfs2.c 2007/04/26 18:45:44 1.20.2.2 +++ cluster/gfs2/mount/mount.gfs2.c 2007/05/14 19:08:43 1.20.2.3 @@ -162,9 +162,12 @@ while ((de = readdir(d))) { if (strnlen(fsname, 5) != strnlen(de->d_name, 5)) continue; - if (!strncmp(fsname, de->d_name, strnlen(fsname, 5))) + if (!strncmp(fsname, de->d_name, strnlen(fsname, 5))) { + closedir(d); return; + } } + closedir(d); die("fs type \"%s\" not found in /sys/fs/, is the module loaded?\n", fsname); }