From patchwork Thu May 20 03:59:57 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Marzinski X-Patchwork-Id: 101116 Received: from mx01.colomx.prod.int.phx2.redhat.com (mx3-phx2.redhat.com [209.132.183.24]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o4K4Ekah024413 for ; Thu, 20 May 2010 04:15:22 GMT Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by mx01.colomx.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o4K4Cbxd024262; Thu, 20 May 2010 00:12:39 -0400 Received: from int-mx08.intmail.prod.int.phx2.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o4K4CZ1g025342 for ; Thu, 20 May 2010 00:12:35 -0400 Received: from ether.msp.redhat.com (ether.msp.redhat.com [10.15.80.119]) by int-mx08.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o4K4CSeQ020239 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Thu, 20 May 2010 00:12:29 -0400 Received: from ether.msp.redhat.com (localhost.localdomain [127.0.0.1]) by ether.msp.redhat.com (8.14.1/8.14.1) with ESMTP id o4K3xvFh008692 for ; Wed, 19 May 2010 22:59:57 -0500 Received: (from bmarzins@localhost) by ether.msp.redhat.com (8.14.1/8.14.1/Submit) id o4K3xvOW008691 for dm-devel@redhat.com; Wed, 19 May 2010 22:59:57 -0500 Date: Wed, 19 May 2010 22:59:57 -0500 From: Benjamin Marzinski To: device-mapper development Message-ID: <20100520035957.GS3295@ether.msp.redhat.com> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.17 (2007-11-01) X-Scanned-By: MIMEDefang 2.67 on 10.5.11.21 X-loop: dm-devel@redhat.com Subject: [dm-devel] [PATCH] multipath: close sysfs file after setting value X-BeenThere: dm-devel@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk Reply-To: device-mapper development List-Id: device-mapper development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dm-devel-bounces@redhat.com Errors-To: dm-devel-bounces@redhat.com X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Thu, 20 May 2010 04:15:22 +0000 (UTC) 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; }