Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp897887rwb; Thu, 11 Aug 2022 11:54:14 -0700 (PDT) X-Google-Smtp-Source: AA6agR6N2PQ46UbSBgef8LM1DcLSDs+IsdSAFY0oE8S/MghfRqoSl8F0krZA6owBFvkCCoTZXW01 X-Received: by 2002:a17:907:28d6:b0:731:5d0:4401 with SMTP id en22-20020a17090728d600b0073105d04401mr269992ejc.765.1660244054689; Thu, 11 Aug 2022 11:54:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660244054; cv=none; d=google.com; s=arc-20160816; b=wjn1JrWqgtRSyvdQj2kDwgbPXmsaig8ToDOCLMIM3niTx1JGwcEPybd6GNwE5BGEIL O9j8TqvkbKU1/raAPOiV7r8ryiSMQaAgTSZ8zQdFp9jT1BeP/Fi5tmQxR9IHYQHw81at //Kgj73MNaJv/R7m8JdayqtmEQxqpWomEVqy79loKQ68usEN94XFNGqokAu3Ia69i+N7 E5b98LwNfEuEWGensIyI/Uv9dZ0XybHHnQIESu0TQPC0zBBOyJgYsv9Xc/ZmczW2a2er 42n8S/wFldyX0wbg3Ng95FKPNEKeZVzXQS3QJlzyFzJXmwM5UGu8mOIGrlhFl9uCR42H NYfw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:references :cc:to:from:content-language:subject:user-agent:mime-version:date :message-id:dkim-signature; bh=DdbX2LXsEvt1nJpgDA8jNe4E5Fy6iy4v9UpXaexOkk8=; b=QM+4m4Uwot2wtAVaMFuil+Kl1i70il/vMnftRU/bNSfjD+SqH/sjrUskDE5vwEAXUq RMqV7OxdF9YvgeBT23zASEoC4mNTY0gWAoC5nAR85HfCefS58zeQfRd9ePyqXMEamCRC VjHcO1G55ihx4aevZZlIioqILnDSizB7MpTz3JNWriV+xKdR30e5qFmyYmS31MromP2r zxc6YWQ7hcCnldMhMVTGnx+iL5psNN1V2Pp7rC/NTmpvXE4iv3+VH8VY5HIQsHy9Ypr2 K4uZ6N67sszmQwJOLtdZgFyK9OFMerhoprqWk5PS/81img44ly1Hv0e/GyiZA6DLP6GN +EaA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b="lY4istv/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l3-20020a50d6c3000000b0043a84878a4bsi216086edj.218.2022.08.11.11.53.47; Thu, 11 Aug 2022 11:54:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b="lY4istv/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235822AbiHKSfQ (ORCPT + 99 others); Thu, 11 Aug 2022 14:35:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43374 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235787AbiHKSfN (ORCPT ); Thu, 11 Aug 2022 14:35:13 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3F0ADEB7 for ; Thu, 11 Aug 2022 11:35:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: Content-Type:In-Reply-To:References:Cc:To:From:Subject:MIME-Version:Date: Message-ID:Sender:Reply-To:Content-ID:Content-Description; bh=DdbX2LXsEvt1nJpgDA8jNe4E5Fy6iy4v9UpXaexOkk8=; b=lY4istv/F3Z8gb9JhvT77ICnuX muK6U8A857lWDiHVFsTdAaJAe2hlMVKnCN0eLk9KzKKFoMptGuoKHZKfL25X1uSRJDB/hnYF/yGCm DLp3rV1nP6iI9LMFr3GsXJGnVxZ5HEchWTwFy5IomwYwndIEXgXdK8pE538zREeprA690aGRZ5Z/z Z4XtL7k7JiR+yxPSwMLhbGCh/Zwy/OE3jG4qpxuBHyhGuGMJ+dHf5ti/X9O9yLDu48cLR/lREPr9P YGXG+Ih/TqajGVZb/O5/d0tYWoPMVZnY2DyxGXdx7g2VvSZ7om3kx5QgztzpRHWzPZjHOGQ1WGEie 0FNymOdQ==; Received: from c-73-157-219-8.hsd1.or.comcast.net ([73.157.219.8] helo=[10.0.0.152]) by bombadil.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1oMD1N-0003cn-9D; Thu, 11 Aug 2022 18:35:11 +0000 Message-ID: <29708eb3-ff1e-411e-cf84-7aa9af765603@infradead.org> Date: Thu, 11 Aug 2022 11:35:04 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 Subject: Re: [PATCH] Doc fix for dget_dlock Content-Language: en-US From: Randy Dunlap To: Anup Parikh Cc: skhan@linuxfoundation.org, linux-kernel@vger.kernel.org References: <98fe1c6d-9528-05b5-c603-fb4ae028a19c@infradead.org> In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_LOW, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 8/11/22 11:33, Randy Dunlap wrote: > Hi-- > > On 8/11/22 07:48, Anup Parikh wrote: >> Hello Mr. Randy Dunlap, >> >> I checked include/linux/dcache.h (dget() and dget_dlock()), include/linux/lockref.h and linux/lib/lockref.c. >> My current knowledge is limited but I think: >> 1) dget_dlock() directly increments the count variable without any atomicity guards. >> 2) dget() does the same but with atomicity guarantee - even across multiple-cores on a multi-core system (according to https://stackoverflow.com/questions/36964478/understanding-synchronization-with-multiple-processors and code in linux/lib/lockref.c). >> >> Please let me know if I should write the corresponding documentation and send a new patch. > > Yes, please. > Thanks. also send the patch to linux-fsdevel@vger.kernel.org since it touches filesystem code. > >> Thanks and Regards, >> Anup K Parikh. >> >> >> On Tue, Aug 9, 2022 at 11:58 PM Randy Dunlap > wrote: >> >> Hi-- >> >> On 8/5/22 09:39, Anup K Parikh wrote: >> > Removes the warning for dget_dlock in include/linux/dcache.h and >> > enables generation of its API documentation >> > >> > Signed-off-by: Anup K Parikh > >> > --- >> >  include/linux/dcache.h | 2 +- >> >  1 file changed, 1 insertion(+), 1 deletion(-) >> > >> > diff --git a/include/linux/dcache.h b/include/linux/dcache.h >> > index f5bba5148..ce0b36f72 100644 >> > --- a/include/linux/dcache.h >> > +++ b/include/linux/dcache.h >> > @@ -297,7 +297,7 @@ extern char *dentry_path(const struct dentry *, char *, int); >> >  /* Allocation counts.. */ >> >  >> >  /** >> > - *   dget, dget_dlock -      get a reference to a dentry >> > + *   dget_dlock -    get a reference to a dentry >> >   *   @dentry: dentry to get a reference to >> >   * >> >   *   Given a dentry or %NULL pointer increment the reference count >> >> Someone was trying to document both dget() and get_dlock() with the same >> kernel-doc comment block. >> I suppose that you could duplicate the comments for dget() also. >> >> It would be nice to know the difference(s) in the functions as well. >> >> thanks. >> -- >> ~Randy >> > -- ~Randy