From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E8132C433E0 for ; Thu, 21 Jan 2021 08:17:37 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B1B8C23976 for ; Thu, 21 Jan 2021 08:17:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727090AbhAUIRP (ORCPT ); Thu, 21 Jan 2021 03:17:15 -0500 Received: from mail.kernel.org ([198.145.29.99]:51830 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726765AbhAUIQ3 (ORCPT ); Thu, 21 Jan 2021 03:16:29 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 0EA932395B; Thu, 21 Jan 2021 08:15:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1611216948; bh=jlGXwu1tfbij7TJcmlF5/XEfn/3LQg2wD0tO1MQn1WE=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=rgOWqcHpKKCiOpXET9VzHjKBIXwWiW2ZUWA+oV/ir8LnBLyEjWZzWCxPQow8wKKan CsYu2KuRioZXH9e2rDzBeY3BTOoFyIhgoTrUUmxGBmvsMMPwAAopQEg6ro8g6R2Zwu FIFwsPrENE3I8GA+JQNG1xu+K47RJUOo/Wni4tZk= Date: Thu, 21 Jan 2021 09:15:44 +0100 From: Greg KH To: Dan Williams Cc: Vishal Verma , Dave Jiang , Ira Weiny , logang@deltatee.com, linux-kernel@vger.kernel.org, linux-nvdimm@lists.01.org Subject: Re: [PATCH 3/3] libnvdimm/ioctl: Switch to cdev_register_queued() Message-ID: References: <161117153248.2853729.2452425259045172318.stgit@dwillia2-desk3.amr.corp.intel.com> <161117154856.2853729.1012816981381380656.stgit@dwillia2-desk3.amr.corp.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <161117154856.2853729.1012816981381380656.stgit@dwillia2-desk3.amr.corp.intel.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jan 20, 2021 at 11:39:08AM -0800, Dan Williams wrote: > The ioctl implementation in libnvdimm is a case study in what can be > cleaned up when the cdev core handles synchronizing in-flight ioctls > with device removal. Switch to cdev_register_queued() which allows for > the ugly context lookup and activity tracking implementation to be > dropped, among other cleanups. I'm confused, the cdev handles the filesystem access from /dev/ which handles the ioctl. Any use of a cdev with relationship to a struct device that might go away is independent, so we really should not tie these together in any way. thanks, greg k-h