multipath: close sysfs file after setting value
authorBenjamin Marzinski <bmarzins@redhat.com>
Thu, 20 May 2010 03:59:57 +0000 (22:59 -0500)
committerChristophe Varoqui <christophe.varoqui@opensvc.com>
Thu, 20 May 2010 04:50:40 +0000 (06:50 +0200)
We need to close the sysfs file after setting its value.

Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
libmultipath/sysfs.c

index b05a27498fd1775bc7f0d57ebc43936fc49e3ace..efbe7c1a2f09e0067fa7d8518e0d1f4eb6da1219 100644 (file)
@@ -407,6 +407,7 @@ sysfs_attr_set_value(const char *devpath, const char *attr_name,
                    path_full, ret);
                ret = -1;
        }
+       close(fd);
 out:
        return ret;
 }