Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp12234502rwd; Fri, 23 Jun 2023 03:22:45 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4Wb6TONKjSUKwaK0CFO3oUVH7WxjCEy5k8pjff80m3oQvu636z79nOm/afwpa5D7mczn/w X-Received: by 2002:a05:6a20:3952:b0:122:7245:80aa with SMTP id r18-20020a056a20395200b00122724580aamr11156465pzg.42.1687515765497; Fri, 23 Jun 2023 03:22:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687515765; cv=none; d=google.com; s=arc-20160816; b=DET+sGHQr0ePr1pRFRGgnjtc5j4SLxax8n2cG5Y0A71JiNVHpy5ZdDw8exiL7t+ie+ Tt4Ugd7dsIJWLG5PdZKnLdE5jcyPATzu+LJ2/duh8UaOKW3iWTEFT02AjUTg1hN/k/zf CAJy0jGQuiV96d8aMfWDXLNyyTCks49UH9NGQXLnQPkLKv+qByT7wPho83MNmQQoR7m7 QE/3QtciwSSndxNugMx8rk4EoYAWfmNTFjZCgIvVU2e749EUZOjKV6uj8zYITEru15si t9ie5KFGv0CQMKyuXo66nxrR3XHznIZD1sr9gdjqxr4H1zIiRBhw6HL0XFXwrSk3C85U ZIeQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:date:mime-version :content-transfer-encoding:references:in-reply-to:cc:to:from:subject :message-id:dkim-signature; bh=HVdMAHFeDlJuzoQpc4zF+bqXmoJfRAb19HLkvLXOCZw=; b=0icl/Dy50zU55ad3FqVqEHp6VGOuaxplhMFjqpxcow0ARMjsjT/e8C2mDZiIVfm+RG +coW6MhMdIFtFeazvRx82TLVDNTr25gc8tAEGNPL8Nc6Z65birre1jDx2RlENKK9tj97 NVTQJPtMn1gn/nlQlKks50Bl4JIUCsusZ51lxeLKifALxqjPeKklXq9iU3/h1Cn0E7dw N32Xyak+qhwgJ4jW2K16/j8QrG48owMomNn8enQEbuAseAxHfQ8kuAEE08WvGxLX6WkV NGRi06TLjazC+i8IaT+rKa3ZgL5wRm7qE3XxvPnH4x68CHW2B2/pH71tVnsgk9a1UloP gMoA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=qF0FqNbg; 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 t12-20020a170902dccc00b001b23d02a0c7si8181797pll.272.2023.06.23.03.22.32; Fri, 23 Jun 2023 03:22:45 -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=@kernel.org header.s=k20201202 header.b=qF0FqNbg; 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 S231556AbjFWJ7e (ORCPT + 99 others); Fri, 23 Jun 2023 05:59:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42770 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229686AbjFWJ7d (ORCPT ); Fri, 23 Jun 2023 05:59:33 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3D287E75; Fri, 23 Jun 2023 02:59:32 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id C4A82619E6; Fri, 23 Jun 2023 09:59:31 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 59253C433C0; Fri, 23 Jun 2023 09:59:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1687514371; bh=4Sre3Xe85q5AdiCISxJI7jZ0ap6BzfWgIsXsmS9GAeg=; h=Subject:From:To:Cc:In-Reply-To:References:Date:From; b=qF0FqNbgti2kUjCNRZktFY/T7IkOS0lKFWJ9d35XUkpV//Dbgvb/A+EveLG/fgnVo UBdskociHfOd35HYD5d9Ejx+hHn5FlaaMy1ZxRFsCZxAIRQMdjXNjn/LhxbPPpS4be BwZ1+tg5L/ix1eyqDu0EpvEBHyMUsxCZMm5YLzXAE4Rg/2NbYGcaow+8cYsmm97kTk AAWHCTCDYVo4rlXoCnoAy2LoQo9yGxuh3RbXT04+6Yc6HrBRpFZVUJ5Tq0X8HQNY8L CVrz3xO+Qv32lcWcKkaFiQ3SLSVKXTK1PTXOcgc1jqkceav+NXiglVIbSD3TFJl6zl chQQUgcz8Krmw== Message-ID: <3719669bc40890e3a8221593ff8a178411ad749b.camel@kernel.org> Subject: Re: [PATCH] fcntl.2: document F_UNLCK F_OFD_GETLK extension From: Jeff Layton To: Stas Sergeev , linux-kernel@vger.kernel.org Cc: Chuck Lever , Alexander Viro , Christian Brauner , linux-fsdevel@vger.kernel.org, Shuah Khan , linux-kselftest@vger.kernel.org, linux-api@vger.kernel.org In-Reply-To: <20230621152214.2720319-4-stsp2@yandex.ru> References: <20230621152214.2720319-1-stsp2@yandex.ru> <20230621152214.2720319-4-stsp2@yandex.ru> Content-Type: text/plain; charset="ISO-8859-15" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Date: Thu, 22 Jun 2023 08:03:53 -0400 User-Agent: Evolution 3.48.3 (3.48.3-1.fc38) X-Spam-Status: No, score=-3.4 required=5.0 tests=BAYES_00,DATE_IN_PAST_12_24, DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_PASS,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 Wed, 2023-06-21 at 20:22 +0500, Stas Sergeev wrote: > F_UNLCK has the special meaning when used as a lock type on input. > It returns the information about any lock found in the specified > region on that particular file descriptor. Locks on other file > descriptors are ignored by F_UNLCK. >=20 > Signed-off-by: Stas Sergeev >=20 > CC: Jeff Layton > CC: Chuck Lever > CC: Alexander Viro > CC: Christian Brauner > CC: linux-fsdevel@vger.kernel.org > CC: linux-kernel@vger.kernel.org > CC: Shuah Khan > CC: linux-kselftest@vger.kernel.org > CC: linux-api@vger.kernel.org >=20 > --- > man2/fcntl.2 | 7 +++++++ > 1 file changed, 7 insertions(+) >=20 > diff --git a/man2/fcntl.2 b/man2/fcntl.2 > index 7b5604e3a..e3e3e7b8c 100644 > --- a/man2/fcntl.2 > +++ b/man2/fcntl.2 > @@ -604,6 +604,13 @@ then details about one of these locks are returned v= ia > .IR lock , > as described above for > .BR F_GETLK . > +.B F_UNLCK > +has the special meaning when put into > +.I l_type > +as an input. It returns the information about any lock in the specified > +range on that particular file descriptor. The locks on other file > +descriptors are ignored by > +.BR F_UNLCK . > .PP > In the current implementation, > .\" commit 57b65325fe34ec4c917bc4e555144b4a94d9e1f7 We need to be pedantic for manpages. A "file description" is the representation of the open file in the kernel (basically, the "struct file" in the kernel). A file _descriptor_ is the numeric identifier returned by open() and similar functions. The locks are owned by the file description, so that would be the better term to use here. I think you want something like: "When the l_type is set to F_UNLCK, returned locks are limited to ones set on the given file description. Locks set on other file descriptions are ignored on F_GETLK requests with the l_type set to F_UNLCK." --=20 Jeff Layton