Received: by 10.223.164.202 with SMTP id h10csp2971906wrb; Fri, 24 Nov 2017 22:41:11 -0800 (PST) X-Google-Smtp-Source: AGs4zMY32yDqIHaxmoWRliz93kw6GSUIZDujr6w9fGtqYVBmtLhR2Snm/5uE2PYeO94kVfA2KPnH X-Received: by 10.98.160.70 with SMTP id r67mr29550424pfe.153.1511592071061; Fri, 24 Nov 2017 22:41:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1511592071; cv=none; d=google.com; s=arc-20160816; b=qbaHIbAI5CFs8xAihsZzYO2I6ae+oVOeCsKyS6D0/sGadPWH+u7Ix3Z04Bi40PZpuc WQF1Bctf6xN3BdBxvNE7ra5vJMOsT543NPmKXD3Dm8uQcrrJCbTYWPEu5FOkqk+6JWbv 7vVKggCI/egF0NdSPbGpx42197XsEy2wdPYm15yK3B3MRe1ZCGXKY0/Osl0sNCx3ge/Y WJIngpQwwlvryK2rsIMLH41Q81QZ+pxf00uQ5rNbJhfCdqlsVdxIi+QEkZyxMMAXYR/u 3RRh0YWL7CF/ccyfNYUmRyE5TKFIqEqIOrzke20x5dbmAy3mP6eWkYKCw9AfUT5jY2wi r/Gg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=Vdv25g+vS60X8rpL9Rz6Sati9bmhY1XJmDogqU8Jxg4=; b=wzo668K4457/ZSmuo2IOr+IC6bN288zSmNUyPJwUASRmuI72nRQHqTxV6lOMHrMmF+ KEqcbzxltJXgYQ+AQm/od9ZhjN59F5skFrVymX0VwBm+VHf3FGzpHsPCqxb78kbDZsPk ZYF61nkOo/fQMpFXAx9oJclXH57Nb6VkHQJHZHUyNN8MmuzpUS/WztQaei02X4gJx3Fx nxqP3GhiviqL5Ddn0Xd6v3860SRGYTEdiC4G3VckupJ7F1xOAx3pwivp7zmrrfXdOhBt titl1gZn+fxoYJyAHoK8GRFQS+cHO4317kqECRTF8qhgmzoSk6wziuWB5sVcmOhySEx8 2VYg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=WqMKyTGo; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p64si21736808pfl.131.2017.11.24.22.40.53; Fri, 24 Nov 2017 22:41:11 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=WqMKyTGo; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751540AbdKYGkD (ORCPT + 78 others); Sat, 25 Nov 2017 01:40:03 -0500 Received: from mail-pl0-f65.google.com ([209.85.160.65]:34930 "EHLO mail-pl0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751018AbdKYGkA (ORCPT ); Sat, 25 Nov 2017 01:40:00 -0500 Received: by mail-pl0-f65.google.com with SMTP id 62so5513549plc.2; Fri, 24 Nov 2017 22:40:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=Vdv25g+vS60X8rpL9Rz6Sati9bmhY1XJmDogqU8Jxg4=; b=WqMKyTGoOuBkvI8WH3yKjrXvbPkHxZnrKbErlwFebVGzVY2+wp+Q1ovWbDa0GVZhWC gDGyE1CbsOO7u3+/+hGzNvZ4/RP8cpxbDWF278rDYZHBcqQRtRCxCORA8q/f0JX/d9yz dBcNa5Zo0vARAtOkGIB4hbugvQZElhKU7aWPKyxHtBDV0a+q8BZi7+RDEg4CMJumFWNl 4srrBwwk63EcuQ+rWTsdG5f6Rk4qs1xTXRwVAh0LQXdMI59CmpA7DgOCNqDNwBqsTRDX oECTkr2mPSlSeTYDsOzsU6gnRvzR8HvxmwSDSEFbdJxu1R8eK+IyRD08r9H4iijA8Cby PezA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=Vdv25g+vS60X8rpL9Rz6Sati9bmhY1XJmDogqU8Jxg4=; b=GoHkT7p0BWz73aySAXUPKtZI/94QGzD1Uk47NO6Cgrz5PuwtTA252urldfWfOfjq7R EPtS+DpzfGObbCRqK+hnaJQuKSE6sIKeegaCp0Y3PssrlkpSr0L9VYaemDN5RT7QUy8K 1tnVqZVZALjVzNAnoAQ/FcFMNhc/FZRUiNRfDf62pexF/IzLHwMnnx8FJwugz6X8qq4l DQoepno8V/v8Bnct670Ud7xAXMA/DbMp/GJJ4gUHHgbxj+eXMg1rwZ/C8cPsySs8nWn6 rwO3LqbTfcQv3CRNyiafVVDHpAqzYkF0wBCyl+A6MYA+vRt7LXQ4rrUsErLyumhIME2k oLRw== X-Gm-Message-State: AJaThX5nnZ8k9fqGcdnHdsVmtGUaeN3sT4/2+08JW/mYdD1Zk0GbseLU qzclPcCmfFuSZXE/ZWhtEBw= X-Received: by 10.84.245.22 with SMTP id i22mr4151457pll.123.1511591999984; Fri, 24 Nov 2017 22:39:59 -0800 (PST) Received: from localhost.localdomain ([103.16.68.147]) by smtp.gmail.com with ESMTPSA id 62sm34027939pgh.31.2017.11.24.22.39.56 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 24 Nov 2017 22:39:59 -0800 (PST) From: Arvind Yadav To: gilad@benyossef.com, gregkh@linuxfoundation.org, oleg.drokin@intel.com, andreas.dilger@intel.com, jsimmons@infradead.org, paulmck@linux.vnet.ibm.com, vitaly_fertman@xyratex.com, yawei.niu@intel.com Cc: linux-kernel@vger.kernel.org, linux-crypto@vger.kernel.org, driverdev-devel@linuxdriverproject.org, devel@driverdev.osuosl.org, lustre-devel@lists.lustre.org Subject: [PATCH 3/4] staging: lustre: obdclass: Remove a attribute group from a kobject Date: Sat, 25 Nov 2017 12:09:30 +0530 Message-Id: <1511591971-8615-4-git-send-email-arvind.yadav.cs@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1511591971-8615-1-git-send-email-arvind.yadav.cs@gmail.com> References: <1511591971-8615-1-git-send-email-arvind.yadav.cs@gmail.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org All attribute group created during class_procfs_init() should be removed. if class_procfs_init() will fail and also in class_procfs_clean(). Signed-off-by: Arvind Yadav --- drivers/staging/lustre/lustre/obdclass/linux/linux-module.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/staging/lustre/lustre/obdclass/linux/linux-module.c b/drivers/staging/lustre/lustre/obdclass/linux/linux-module.c index fc59f29..5795123 100644 --- a/drivers/staging/lustre/lustre/obdclass/linux/linux-module.c +++ b/drivers/staging/lustre/lustre/obdclass/linux/linux-module.c @@ -501,6 +501,7 @@ int class_procfs_init(void) rc = debugfs_lustre_root ? PTR_ERR(debugfs_lustre_root) : -ENOMEM; debugfs_lustre_root = NULL; + sysfs_remove_group(lustre_kobj, &lustre_attr_group); kobject_put(lustre_kobj); goto out; } @@ -509,6 +510,7 @@ int class_procfs_init(void) &obd_device_list_fops); if (IS_ERR_OR_NULL(file)) { rc = file ? PTR_ERR(file) : -ENOMEM; + sysfs_remove_group(lustre_kobj, &lustre_attr_group); kobject_put(lustre_kobj); goto out; } @@ -522,6 +524,7 @@ int class_procfs_clean(void) debugfs_lustre_root = NULL; + sysfs_remove_group(lustre_kobj, &lustre_attr_group); kobject_put(lustre_kobj); return 0; -- 2.7.4 From 1584969526033577842@xxx Fri Nov 24 17:32:09 +0000 2017 X-GM-THRID: 1584938371138458837 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread