]> git.ipfire.org Git - thirdparty/mdadm.git/commitdiff
Remove supertype->devfd
authorNeil Brown <neilb@suse.de>
Mon, 26 May 2008 23:18:40 +0000 (09:18 +1000)
committerNeil Brown <neilb@suse.de>
Mon, 26 May 2008 23:18:40 +0000 (09:18 +1000)
It is never used.

mdadm.h
mdmon.c

diff --git a/mdadm.h b/mdadm.h
index 20ed452027d63afeaadbc1fa9746ea563587eea8..7b11ffb1bb93710f75ccbaf547a2731902e1d6f1 100644 (file)
--- a/mdadm.h
+++ b/mdadm.h
@@ -452,7 +452,6 @@ struct supertype {
 
        /* extra stuff used by mdmon */
        struct active_array *arrays;
 
        /* extra stuff used by mdmon */
        struct active_array *arrays;
-       int devfd;
        int sock; /* listen to external programs */
        int mgr_pipe[2]; /* communicate between threads */
        int mon_pipe[2]; /* communicate between threads */
        int sock; /* listen to external programs */
        int mgr_pipe[2]; /* communicate between threads */
        int mon_pipe[2]; /* communicate between threads */
diff --git a/mdmon.c b/mdmon.c
index 7ba8be04a8d547653eb520b276d61eae7785c19f..2919a02f4e98f73fa5a8e9993ba95abfdacd6d4a 100644 (file)
--- a/mdmon.c
+++ b/mdmon.c
@@ -196,7 +196,6 @@ int main(int argc, char *argv[])
        /* hopefully it is a container - we'll check later */
 
        container = malloc(sizeof(*container));
        /* hopefully it is a container - we'll check later */
 
        container = malloc(sizeof(*container));
-       container->devfd = mdfd;
        container->devnum = fd2devnum(mdfd);
        container->devname = devnum2devname(container->devnum);
 
        container->devnum = fd2devnum(mdfd);
        container->devname = devnum2devname(container->devnum);
 
@@ -269,6 +268,7 @@ int main(int argc, char *argv[])
                exit(3);
        }
 
                exit(3);
        }
 
+       close(mdfd);
 
        mlockall(MCL_FUTURE);
 
 
        mlockall(MCL_FUTURE);