From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 3sFZcW1J8zzDr5c for ; Fri, 19 Aug 2016 04:38:50 +1000 (AEST) Received: from pps.filterd (m0098409.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.11/8.16.0.11) with SMTP id u7IIXcfp012567 for ; Thu, 18 Aug 2016 14:38:48 -0400 Received: from e32.co.us.ibm.com (e32.co.us.ibm.com [32.97.110.150]) by mx0a-001b2d01.pphosted.com with ESMTP id 24v7sk1qdx-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Thu, 18 Aug 2016 14:38:48 -0400 Received: from localhost by e32.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 18 Aug 2016 12:38:45 -0600 Reply-To: manoj@linux.vnet.ibm.com Subject: Re: [PATCH 3/6] cxlflash: Add kref to context References: <1470785888-9112-1-git-send-email-mrochs@linux.vnet.ibm.com> <1470785982-9233-1-git-send-email-mrochs@linux.vnet.ibm.com> To: "Matthew R. Ochs" , linux-scsi@vger.kernel.org, James Bottomley , "Martin K. Petersen" , Uma Krishnan , Al Viro Cc: Brian King , linuxppc-dev@lists.ozlabs.org, Ian Munsie , Andrew Donnellan , Frederic Barrat , Christophe Lombard From: Manoj Kumar Date: Thu, 18 Aug 2016 13:38:41 -0500 MIME-Version: 1.0 In-Reply-To: <1470785982-9233-1-git-send-email-mrochs@linux.vnet.ibm.com> Content-Type: text/plain; charset=windows-1252; format=flowed Message-Id: <7f1b0544-9ae9-e45e-c476-e46c0fb077d4@linux.vnet.ibm.com> List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Acked-by: Manoj N. Kumar On 8/9/2016 6:39 PM, Matthew R. Ochs wrote: > Currently, context user references are tracked via the list of LUNs > that have attached to the context. While convenient, this is not > intuitive without a deep study of the code and is inconsistent with > the existing reference tracking patterns within the kernel. This design > choice can lead to future bug injection. > > To improve code comprehension and better protect against future bugs, add > explicit reference counting to contexts and migrate the context removal > code to the kref release handler. > > Inspired-by: Al Viro > Signed-off-by: Matthew R. Ochs