Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp410257pxb; Thu, 21 Jan 2021 09:55:27 -0800 (PST) X-Google-Smtp-Source: ABdhPJxpL+aLBXCWAoomcaVGlZiiFGYJom5M8BVdJ5y7HMdXAr9RSp6Ur2h1cjeEz5AQ2T/3lMuP X-Received: by 2002:a17:906:f950:: with SMTP id ld16mr417077ejb.553.1611251727508; Thu, 21 Jan 2021 09:55:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611251727; cv=none; d=google.com; s=arc-20160816; b=nSZ6ee0wY5QmTaoqn3Lm1AM2vyVU9RS4oz0QCwzse7L+Ki1564R3jDnYuu1VD1im+D arrIIEW9/SDVQ0HNH8LoddmCFVa78qbcUOtE2x1HkixxzJuKiK8waGCaXPCpbPD5n9pZ 9O1n1gexnAYj964cto2xIJLtpXAUoyz90HO/LPGiGuJwZmhjwVXneAQm8Gx6Gg2Pr/cA CpB9yvEK4wPeNHfNavmscGlC4NyDMbUr9rJCniodu2EfYXZ6ssylFys8U6RCXP789hhU 43QuefG3pfzafvaXNKmRonxaMwzMzNKH3mYf2K/klmK61DR7TbRQ+uS59A4VP809OcXN hq2Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=OqDGr5OXXLDXoZ+kvErdRqn2LWaoGkSZKNVGtOHo0BI=; b=fcQ582NFjFbWHvBxvaaIIorV6nLeoKW5ooEsT6BtyAWIWpqlpoSf4C/gdN+7xGkqJj VfbmNG8JcK63CcEzoTLTQxkNanVCn+S+KX1beo4ucTfXs5GGvzW3Ksro+6uSFhO+1dRS Wu4z9+CGDYHgPImj+2oQT45L51m6XzWOMbhVehFtqdV1M8BUP/i2h96qsK/SfQiytM49 QQgjzp7UG++vsCbroEJ6AcBEMn+OIyCx7O7i84JveDX7rs1Vuh1ywNE0ZBTYqRyj4bhZ JEvWrjAF+At9DQH+KPCLGmBkrzDP0dYp7KBVyLDc9cyzFEsPPtUhfxe1t2Id3m00P0BI kkTg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel-com.20150623.gappssmtp.com header.s=20150623 header.b=eVFeNLK0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f22si2061500ejq.233.2021.01.21.09.54.56; Thu, 21 Jan 2021 09:55:27 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@intel-com.20150623.gappssmtp.com header.s=20150623 header.b=eVFeNLK0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389016AbhAURvM (ORCPT + 99 others); Thu, 21 Jan 2021 12:51:12 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39692 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388179AbhAURu4 (ORCPT ); Thu, 21 Jan 2021 12:50:56 -0500 Received: from mail-ej1-x630.google.com (mail-ej1-x630.google.com [IPv6:2a00:1450:4864:20::630]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4C50DC06174A for ; Thu, 21 Jan 2021 09:50:16 -0800 (PST) Received: by mail-ej1-x630.google.com with SMTP id 6so3868516ejz.5 for ; Thu, 21 Jan 2021 09:50:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=OqDGr5OXXLDXoZ+kvErdRqn2LWaoGkSZKNVGtOHo0BI=; b=eVFeNLK0LrN/WxB0D4SEhXIkmQeMvag+qoGefW6ONj0khNhIHCAYmWw9sI6fc2p/Tf iNvWC56d2SekCqH8W6lVW6vuLj7fDrh9atefJI9fHFKN2HbcrU+BybCJPwFsyDFpRFNK aCVFjPZzn5Am8jeJnz5DbslQlxvVq2s9ENXpN8U2sPN5shejLfm8wz/+ocREFbtvzFy1 c+nYHU62Xh+DGpT9kdA3H7YH5d1SS4wIR6W3QDVZ9tK9wT6uvi7iMi4JW1x2KQTscaAC 6hIH7fPbeJwm/QeZw+nqKA6JnkG1MevMAYjn83JoB8kq1Y5klO9TM5ajhVa7bqHtLcO1 yNLQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=OqDGr5OXXLDXoZ+kvErdRqn2LWaoGkSZKNVGtOHo0BI=; b=JxWY5yqNcM/HEQ4jwdTyUiFCz5OB8kHMm0m9U8Ge9otbwm/1zlw6+yPX7rZpYXE/EH IsOkie4TahmIghKMdf/Bd2pEC+4rPgmkTdWcOtt0yp3HnuwcbnkD0AasUkcMoy8H5jE2 uqd5M7wR1vBm4zP5Wlr7Ga6KRRv0H7xlX29+FGtOQqtGSCnEBUzwm3RnSEKYXk4zGCeu Wbg6lt+ZMpEXLawFtVYGgGaMroFInwvWHQJzdHfKLDOL4CSrw9Ebq3/+wYlkaTlfHwgy vl9t1L3VvpYaOy0lBu86Pc+xTYTlFUBpMTqCcfTcKXA2ThbHSI+A5WMknRA9y66tSX1Z MZWA== X-Gm-Message-State: AOAM531CRbGU7M0Y5frHpQO29NBEhEIi+j53hg7HH2gl4uX9ltWDlCJp Q6B3A0kKnvykAbPdh/UBToU7tyV/18lJ1ZSCrWwGww== X-Received: by 2002:a17:906:ce49:: with SMTP id se9mr413181ejb.341.1611251415063; Thu, 21 Jan 2021 09:50:15 -0800 (PST) MIME-Version: 1.0 References: <161117153248.2853729.2452425259045172318.stgit@dwillia2-desk3.amr.corp.intel.com> <161117153776.2853729.6944617921517514510.stgit@dwillia2-desk3.amr.corp.intel.com> In-Reply-To: From: Dan Williams Date: Thu, 21 Jan 2021 09:50:09 -0800 Message-ID: Subject: Re: [PATCH 1/3] cdev: Finish the cdev api with queued mode support To: Greg KH Cc: Logan Gunthorpe , Hans Verkuil , Alexandre Belloni , Alexander Viro , Dave Jiang , Vishal L Verma , Linux Kernel Mailing List , linux-nvdimm Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jan 21, 2021 at 12:13 AM Greg KH wrote: > > On Wed, Jan 20, 2021 at 11:38:57AM -0800, Dan Williams wrote: > > -void cdev_del(struct cdev *p) > > +void cdev_del(struct cdev *cdev) > > { > > - cdev_unmap(p->dev, p->count); > > - kobject_put(&p->kobj); > > + cdev_unmap(cdev->dev, cdev->count); > > + kobject_put(&cdev->kobj); > > After Christoph's patch series, the kobject in struct cdev does nothing, > so I will be removing it. So I don't think this patch set is going to > do what you want :( The proposal in this series has nothing to do with kobject lifetime. Please take another look at the file_operations shutdown coordination problem and the fact that it's not just cdev that has a use case to manage file_operations this way. I believe Christoph's only objection, correct me if I'm wrong, is that this proposal invents a new third way to do this relative to procfs and debugfs. Perhaps there's a way to generalize this for all three, and I'm going to put some thought there, but at this point I think I'm failing to describe the problem clearly.