Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp1936652rwb; Fri, 11 Nov 2022 02:39:40 -0800 (PST) X-Google-Smtp-Source: AA0mqf7fHQbNGpREX4Upoi6JIw+jE9RLX0xwCwv6SVxYESKw5Z4d40AzWdpNwbMCq5Gzurpw5v7m X-Received: by 2002:a17:906:8385:b0:7ad:8035:ae3d with SMTP id p5-20020a170906838500b007ad8035ae3dmr1394169ejx.46.1668163180041; Fri, 11 Nov 2022 02:39:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668163180; cv=none; d=google.com; s=arc-20160816; b=hSm4qc4n93BI8iXodKFhSjuoDDdBOBgT8Ro9mW0p4/srTM4A8hS58cu4XX8uCMImdZ am73mQmbsvZA1rCnGyxveORMSC1NAGXwBLI4p6S+aCP9/R2+4kfiv8EZlnYcr9zq39sr Ojyp7u6m6/FWfIiA2iYnqyhZUA+MJb03f+2Mph00pvQLkRL+YmJRV6WURWrTl1jIfFV1 wnFUGlz07Fj/Hrx2yywZ5WPgJ9Ypu1GHCArh8rkF3DLITvHTorPrj3D2Y3f1q04Ai0Pe s3G+scwlPtXNwp69MaxAk0L3/AArbcbcYjDtPiDxfF0QImOhdFxzKK+zp0qdGww3AMfl 3Njw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent :content-transfer-encoding:references:in-reply-to:date:cc:to:from :subject:message-id:dkim-signature; bh=QiQbWapv499sx+8qGFsMqL9bv4xgBnqH6DUT4/Mxr+c=; b=ewkKHzTzid041ia3K9RjgYIGiDDyUgcm2gZ6QBfbSIGKkV1NyXnMeRd6ydSfIIeN2Y +3yY+Jmby21PTJILB2rwVB4SiAOIKXmPdAlGIeeqFvBpDAkvmqZsz2Zkw1R5JcCE+AwL L6B8bl28mh3MYSO20WZESouKaeRqLbqFuTzt7CszWRS3k/1wVX82KLVJXJlGiDLMulRz wQ1RAEhI2hdsIQO/uAWs78s5kFVfBQz3eHubRw8DksPDa1IvweaTfbFW70ZwxCFubc2W sbb/Nu34k5DL23ED2XwHGdBP8KHucglSE57SuFlMXeDG+bm8/Y5Yj8TbbAds+CpdYOoS QFIg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=CWAMCDwd; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b1-20020aa7d481000000b00463a61c257dsi1616101edr.524.2022.11.11.02.39.17; Fri, 11 Nov 2022 02:39:40 -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=@kernel.org header.s=k20201202 header.b=CWAMCDwd; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233185AbiKKKBI (ORCPT + 93 others); Fri, 11 Nov 2022 05:01:08 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44304 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229461AbiKKKBG (ORCPT ); Fri, 11 Nov 2022 05:01:06 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D9FE712A9D; Fri, 11 Nov 2022 02:01:03 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 63C4FB824B3; Fri, 11 Nov 2022 10:01:02 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id AFD66C433C1; Fri, 11 Nov 2022 10:00:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1668160861; bh=J/SNzBV26xb9ZimfbKHbIygGDSH+VKjLiTdatAabHUg=; h=Subject:From:To:Cc:Date:In-Reply-To:References:From; b=CWAMCDwd0DNVCl2n+7x7qRgOt8XV8Dum5DDdsSz+t1u5huY/MLARrguHiUdUkHO53 +8ZOASRWR+VcG2m3itoXLWX7f4ESIiKjnlXkrqR4Us/XzwMZ7oGB5sPhAwfr3+JvH/ 5sgkZVhebQlU7SeOoUmHSJXHf+145tg4HjnrD4Yx6tEi1i6m39+in4gusS61XdjiDD vIqI3X0q0mi6pj9MVKX8X7Dn4R8AULo0/paUx3NC5YVGCN5JC07HmeJaUYTdbao34g ZnWvPXTgMqfNCngRNgLD5SJ97W3IwLHPJMLamNWBjnz3GjUDlswBJ8isO/knD78mu4 BBCC1c1HKu5bw== Message-ID: Subject: Re: [PATCH v3 13/15] fcntl: remove FASYNC_MAGIC From: Jeff Layton To: Ahelenia =?UTF-8?Q?Ziemia=C5=84ska?= Cc: Jonathan Corbet , Federico Vaga , Alex Shi , Yanteng Si , Hu Haowen , Chuck Lever , Alexander Viro , Greg Kroah-Hartman , Jakub Kicinski , Jiri Slaby , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-doc-tw-discuss@lists.sourceforge.net, linux-fsdevel@vger.kernel.org Date: Fri, 11 Nov 2022 05:00:58 -0500 In-Reply-To: <756e6016fab23e95d891b6284fbf52184135ee46.1668128257.git.nabijaczleweli@nabijaczleweli.xyz> References: <756e6016fab23e95d891b6284fbf52184135ee46.1668128257.git.nabijaczleweli@nabijaczleweli.xyz> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.44.4 (3.44.4-2.fc36) MIME-Version: 1.0 X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, 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 Fri, 2022-11-11 at 02:14 +0100, Ahelenia Ziemia=C5=84ska wrote: > We have largely moved away from this approach, and we have better > debugging instrumentation nowadays: kill it. >=20 > Link: https://lore.kernel.org/linux-doc/YyMlovoskUcHLEb7@kroah.com/ > Signed-off-by: Ahelenia Ziemia=C5=84ska > --- > Documentation/process/magic-number.rst | 1 - > Documentation/translations/it_IT/process/magic-number.rst | 1 - > Documentation/translations/zh_CN/process/magic-number.rst | 1 - > Documentation/translations/zh_TW/process/magic-number.rst | 1 - > fs/fcntl.c | 6 ------ > include/linux/fs.h | 3 --- > 6 files changed, 13 deletions(-) >=20 > diff --git a/Documentation/process/magic-number.rst b/Documentation/proce= ss/magic-number.rst > index e59c707ec785..6e432917a5a8 100644 > --- a/Documentation/process/magic-number.rst > +++ b/Documentation/process/magic-number.rst > @@ -68,6 +68,5 @@ Changelog:: > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D > Magic Name Number Structure File > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D > -FASYNC_MAGIC 0x4601 fasync_struct ``includ= e/linux/fs.h`` > CCB_MAGIC 0xf2691ad2 ccb ``driver= s/scsi/ncr53c8xx.c`` > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D > diff --git a/Documentation/translations/it_IT/process/magic-number.rst b/= Documentation/translations/it_IT/process/magic-number.rst > index 37a539867b6f..7d4c117ac626 100644 > --- a/Documentation/translations/it_IT/process/magic-number.rst > +++ b/Documentation/translations/it_IT/process/magic-number.rst > @@ -74,6 +74,5 @@ Registro dei cambiamenti:: > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D > Nome magico Numero Struttura File > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D > -FASYNC_MAGIC 0x4601 fasync_struct ``includ= e/linux/fs.h`` > CCB_MAGIC 0xf2691ad2 ccb ``driver= s/scsi/ncr53c8xx.c`` > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D > diff --git a/Documentation/translations/zh_CN/process/magic-number.rst b/= Documentation/translations/zh_CN/process/magic-number.rst > index 8a3a3e872c52..c17e3f20440a 100644 > --- a/Documentation/translations/zh_CN/process/magic-number.rst > +++ b/Documentation/translations/zh_CN/process/magic-number.rst > @@ -57,6 +57,5 @@ Linux =E9=AD=94=E6=9C=AF=E6=95=B0 > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D > =E9=AD=94=E6=9C=AF=E6=95=B0=E5=90=8D =E6=95=B0=E5=AD=97 = =E7=BB=93=E6=9E=84 =E6=96=87=E4=BB=B6 > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D > -FASYNC_MAGIC 0x4601 fasync_struct ``includ= e/linux/fs.h`` > CCB_MAGIC 0xf2691ad2 ccb ``driver= s/scsi/ncr53c8xx.c`` > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D > diff --git a/Documentation/translations/zh_TW/process/magic-number.rst b/= Documentation/translations/zh_TW/process/magic-number.rst > index 7ace7834f7f9..e2eeb74e7192 100644 > --- a/Documentation/translations/zh_TW/process/magic-number.rst > +++ b/Documentation/translations/zh_TW/process/magic-number.rst > @@ -60,6 +60,5 @@ Linux =E9=AD=94=E8=A1=93=E6=95=B8 > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D > =E9=AD=94=E8=A1=93=E6=95=B8=E5=90=8D =E6=95=B8=E5=AD=97 = =E7=B5=90=E6=A7=8B =E6=96=87=E4=BB=B6 > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D > -FASYNC_MAGIC 0x4601 fasync_struct ``includ= e/linux/fs.h`` > CCB_MAGIC 0xf2691ad2 ccb ``driver= s/scsi/ncr53c8xx.c`` > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D > diff --git a/fs/fcntl.c b/fs/fcntl.c > index 146c9ab0cd4b..e366a3804108 100644 > --- a/fs/fcntl.c > +++ b/fs/fcntl.c > @@ -924,7 +924,6 @@ struct fasync_struct *fasync_insert_entry(int fd, str= uct file *filp, struct fasy > } > =20 > rwlock_init(&new->fa_lock); > - new->magic =3D FASYNC_MAGIC; > new->fa_file =3D filp; > new->fa_fd =3D fd; > new->fa_next =3D *fapp; > @@ -988,11 +987,6 @@ static void kill_fasync_rcu(struct fasync_struct *fa= , int sig, int band) > struct fown_struct *fown; > unsigned long flags; > =20 > - if (fa->magic !=3D FASYNC_MAGIC) { > - printk(KERN_ERR "kill_fasync: bad magic number in " > - "fasync_struct!\n"); > - return; > - } > read_lock_irqsave(&fa->fa_lock, flags); > if (fa->fa_file) { > fown =3D &fa->fa_file->f_owner; > diff --git a/include/linux/fs.h b/include/linux/fs.h > index e654435f1651..acfd5db5341a 100644 > --- a/include/linux/fs.h > +++ b/include/linux/fs.h > @@ -1345,15 +1345,12 @@ static inline int locks_lock_file_wait(struct fil= e *filp, struct file_lock *fl) > =20 > struct fasync_struct { > rwlock_t fa_lock; > - int magic; > int fa_fd; > struct fasync_struct *fa_next; /* singly linked list */ > struct file *fa_file; > struct rcu_head fa_rcu; > }; > =20 > -#define FASYNC_MAGIC 0x4601 > - > /* SMP safe fasync helpers: */ > extern int fasync_helper(int, struct file *, int, struct fasync_struct *= *); > extern struct fasync_struct *fasync_insert_entry(int, struct file *, str= uct fasync_struct **, struct fasync_struct *); Reviewed-by: Jeff Layton