From mboxrd@z Thu Jan 1 00:00:00 1970 From: Benjamin Marzinski Subject: [PATCH] multipath: close sysfs file after setting value Date: Wed, 19 May 2010 22:59:57 -0500 Message-ID: <20100520035957.GS3295@ether.msp.redhat.com> Reply-To: device-mapper development Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dm-devel-bounces@redhat.com Errors-To: dm-devel-bounces@redhat.com To: device-mapper development List-Id: dm-devel.ids We need to close the sysfs file after setting its value. Signed-off-by: Benjamin Marzinski --- libmultipath/sysfs.c | 1 + 1 file changed, 1 insertion(+) Index: multipath-tools/libmultipath/sysfs.c =================================================================== --- multipath-tools.orig/libmultipath/sysfs.c +++ multipath-tools/libmultipath/sysfs.c @@ -407,6 +407,7 @@ sysfs_attr_set_value(const char *devpath path_full, ret); ret = -1; } + close(fd); out: return ret; }