Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp14680535rwb; Mon, 28 Nov 2022 04:01:09 -0800 (PST) X-Google-Smtp-Source: AA0mqf6/QUsa0Yd86vRPDrO+rVFDdRToX0m08ynfhzOjmN7R7Wv0XR0s3h+29PK1ew21CnxSjT3w X-Received: by 2002:a63:e617:0:b0:41a:4bd4:f466 with SMTP id g23-20020a63e617000000b0041a4bd4f466mr35156496pgh.499.1669636868887; Mon, 28 Nov 2022 04:01:08 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1669636868; cv=pass; d=google.com; s=arc-20160816; b=yr2d59A7erbZ/nqBkwUi/6LAdvs+2ZEtFiT9pVa8oaoSWqy/YnEuINbE/vEeMaLQ/6 fc2Y24+pka96rMxJlXlzmc+xsMU87WlLn8MZnHtFJ2Bnv5AzZZfnX5v+3NdDroap6MNm kfp4npxsrfaGM9jX0UVZPRUVOZGpuO0bO/2h+Ca5H8CWq/tUtWWJ+JvUxf9QGHLqPnLQ V4b/VDJEJPG8Y6Qcc8wYS640LwjKT9tFuGzn+VrCLqr2SBrcJIaF11elvNWbhQeVSY9C sCsnfrCMWmMqc4wS70g3wcVyIck6TPsor527KEGT21PVeuVWfMZ5gTNBDSWQylSUvBFZ wHgw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to :content-language:references:cc:to:from:subject:user-agent :mime-version:date:message-id:dkim-signature; bh=tnLz2qpKPI3vYwMGy9lOfRIw4je11ytpVT+lhHW/+Qg=; b=nDMpbejaMv1t/KAgnENsiwdmI35rzX7xyaCS+KwfQgAod2pW6LqarnEMT7s3YczqGQ wKumg6jKyOdT4s8Ceq1pfxN3rkro7vTW3B2vSF5KiA7x9L0SetAoaD131Hl93aLsHDCY mMaRIQvbomq6uBkoQRjlqmQxbjjDrr7UCOYPLb3oEXAN2Xrf5Bo06fWE9NHUW7jJz2Wv AYTBYVHcMEyhbbY7FIJp6Fphl2hXOjLpzVP+VUfWL6wocJ4T5hzyJh2nlns2KrMxCiSy YbNcYCA5B5iiiXZeCBLTHw1Es7BTNISfb0eSyTlX7+gwDdFhVGhXu0cd9AIETj+YAymX deOQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@siddh.me header.s=zmail header.b=tfokIDKX; arc=pass (i=1 spf=pass spfdomain=siddh.me dkim=pass dkdomain=siddh.me dmarc=pass fromdomain=siddh.me>); 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=siddh.me Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id nd11-20020a17090b4ccb00b001fab0d18bcasi11833444pjb.66.2022.11.28.04.00.58; Mon, 28 Nov 2022 04:01:08 -0800 (PST) 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=@siddh.me header.s=zmail header.b=tfokIDKX; arc=pass (i=1 spf=pass spfdomain=siddh.me dkim=pass dkdomain=siddh.me dmarc=pass fromdomain=siddh.me>); 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=siddh.me Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229848AbiK1Ki0 (ORCPT + 84 others); Mon, 28 Nov 2022 05:38:26 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35680 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230479AbiK1KiD (ORCPT ); Mon, 28 Nov 2022 05:38:03 -0500 Received: from sender-of-o50.zoho.in (sender-of-o50.zoho.in [103.117.158.50]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B017313FA8; Mon, 28 Nov 2022 02:37:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669631807; cv=none; d=zohomail.in; s=zohoarc; b=f7Vkrq9jkn0HdgdrF+Wh4ncq+GGSsebcyRYBNsqcYTHRclUJfK6GZePbRmQDC0pmLvF4cIbYkjB0tjmOqAjT9DuNtyXkv/v0BL2whbqlr60zcCG6YUti8RD9JBSyPwKA7OrvVudPVnUUzC1+RRdVg3I7NG9b2jZll5jPewQ9nn4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.in; s=zohoarc; t=1669631807; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=tnLz2qpKPI3vYwMGy9lOfRIw4je11ytpVT+lhHW/+Qg=; b=MVkIZcWesgBR1eRTLS74wg54CR+GOa4tXB5fkrfalio75ubmQPbOPgSq0R7/dtlLXFGMmkSamKwP/onRlzpthjsZsufD7VSDUI7lqlM70QQjLmw7DWXAHrQUJrF+QtKnyB0IHAKnVn3OS7RwWXRZ3VJb9dmEkVWyTb/SqdRdS+k= ARC-Authentication-Results: i=1; mx.zohomail.in; dkim=pass header.i=siddh.me; spf=pass smtp.mailfrom=code@siddh.me; dmarc=pass header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1669631807; s=zmail; d=siddh.me; i=code@siddh.me; h=Message-ID:Date:Date:MIME-Version:Subject:Subject:From:From:To:To:Cc:Cc:References:In-Reply-To:Content-Type:Content-Transfer-Encoding:Message-Id:Reply-To; bh=tnLz2qpKPI3vYwMGy9lOfRIw4je11ytpVT+lhHW/+Qg=; b=tfokIDKX5BgrbyGBN6WgA9XNMY5994pwLNdGxOGtdG6KNNb8kRC1PN5mtsFbg+ep nybrNGyYVe+LUU3ElQbK8TKlTx6LgXYMgz2E0ljqcqyTt/RPpizIfmXlWhJUseqV8Ng eXUHnFJeGQ+6Jgmmla5h2oyEhsqCgTWrfczIBaTw= Received: from [192.168.1.9] (106.201.114.188 [106.201.114.188]) by mx.zoho.in with SMTPS id 1669631805587181.18913226273196; Mon, 28 Nov 2022 16:06:45 +0530 (IST) Message-ID: <6a22e287-9d90-85a9-f5e6-49e600bf0d80@siddh.me> Date: Mon, 28 Nov 2022 16:06:44 +0530 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.5.0 Subject: Re: [RESEND PATCH v2 0/2] watch_queue: Clean up some code From: Siddh Raman Pant To: Mauro Carvalho Chehab , Randy Dunlap , David Howells , Jonathan Corbet , "Fabio M. De Francesco" , Eric Dumazet , Christophe JAILLET , Eric Biggers Cc: linux-fsdevel , linux-kernel , keyrings , linux-security-module References: Content-Language: en-US, en-GB, hi-IN In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-ZohoMailClient: External X-Spam-Status: No, score=-2.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS 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 Sat, 12 Nov 2022 16:00:39 +0530, Siddh Raman Pant wrote: > There is a dangling reference to pipe in a watch_queue after clearing it. > Thus, NULL that pointer while clearing. > > This change renders wqueue->defunct superfluous, as the latter is only used > to check if watch_queue is cleared. With this change, the pipe is NULLed > while clearing, so we can just check if the pipe is NULL. > > Extending comment for watch_queue->pipe in the definition of watch_queue > made the comment conventionally too long (it was already past 80 chars), > so I have changed the struct annotations to be kerneldoc-styled, so that > I can extend the comment mentioning that the pipe is NULL when watch_queue > is cleared. In the process, I have also hopefully improved documentation > by documenting things which weren't documented before. > > Changes in v2: > - Merged the NULLing and removing defunct patches. > - Removed READ_ONCE barrier in lock_wqueue(). > - Improved and fixed errors in struct docs. > - Better commit messages. > > Original date of posting patch: 6 Aug 2022 > > Siddh Raman Pant (2): > include/linux/watch_queue: Improve documentation > kernel/watch_queue: NULL the dangling *pipe, and use it for clear > check > > include/linux/watch_queue.h | 100 ++++++++++++++++++++++++++---------- > kernel/watch_queue.c | 12 ++--- > 2 files changed, 79 insertions(+), 33 deletions(-) > Hi, Please review the quoted patches, which can be found on: https://lore.kernel.org/all/cover.1668248462.git.code@siddh.me/ Please let me know if any changes are required. Thanks, Siddh