Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp7912762rwd; Tue, 20 Jun 2023 07:50:25 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4v2rs457cg90ktBuSUv9SYvKhbPA8P0m/FCXVi2wN5WjJ0XpYPOIN2sNm465JPnUvQb7jp X-Received: by 2002:a17:90b:4d11:b0:25b:d12d:ab83 with SMTP id mw17-20020a17090b4d1100b0025bd12dab83mr24116919pjb.20.1687272625457; Tue, 20 Jun 2023 07:50:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687272625; cv=none; d=google.com; s=arc-20160816; b=ClFOp3K2HFSLhpekgNNcn67dWLIfK7trvZdW4/9EpWdFMb6PRq/kUS9xTWfj3NR09u I0tLawTO0cNkQbG6u5Ry0A2LP17gGwQNEi5qS+dnQamMST3J/Sb8/gSJDsxthgGrFSG8 KoYrP63JjblpvC231NYA2dct31KkYM+qtBJmpWHNMY0bxK+HcT/iu5h6/5lD7f9XY7Gx Fuf/KQwa4hQs6VNSYDpbAoMu/fiQBlm1fygt6n0eSGdyrPV56OCOZ2yx69pNcDmPYKpJ xyqH5vUPK+s0InxZL1NUgPAwOhE01z5o/x26BjAvwo75N2TTNP9uCfc/GzZw6TFwb/DN lQuw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=E6LUAGD2W9fniJVMeYXWWaWOxjcy8tolmVGdHxej/T4=; b=Q7Ys1QDlG2HcYDHAiJ40uwNYfKla3Mrx0MFoKuHQE/Wk/Jfe9I55bAsZQKrlJg/zZU EZq2FCn/BQDV4uZVmWr2fSU++p+mW8fKIXQa3YCWb39wwlDFQmVnvau48Kp0BYVtsC9p 7jBDVydjuw/mjQMha5GkIZmvmjNQYjEgO5KKrzbalYfidRaJHwfnNmRB9egHb0yphk7m 5j12/a+8ozmRyIhqQHrH/GiCQ7uDyXerNsv185GZ1jMkHN9SylYmXyTMFq+thEXGBFNy 1fbsIPk4HbeVqy5dG2McLQD/LGBjoFgG0sFkr+OIfkaZdIAfU0hrHUI6eflLFSNK1gqH Zu+g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=RYOS+Mf9; 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 n31-20020a17090a5aa200b0025691c00096si1993908pji.140.2023.06.20.07.50.04; Tue, 20 Jun 2023 07:50:25 -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=casper.20170209 header.b=RYOS+Mf9; 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 S232728AbjFTOgc (ORCPT + 99 others); Tue, 20 Jun 2023 10:36:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44100 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230490AbjFTOga (ORCPT ); Tue, 20 Jun 2023 10:36:30 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AA1FE1709; Tue, 20 Jun 2023 07:36:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Transfer-Encoding: Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date: Sender:Reply-To:Content-ID:Content-Description; bh=E6LUAGD2W9fniJVMeYXWWaWOxjcy8tolmVGdHxej/T4=; b=RYOS+Mf9ZwkRDYzJNRld1VlcV5 rmAj1dKJ1nFSqFYRaLed5du+1YGpRP3Gs0L1Uq9s8TVJbJFj58Q0u6yAbYBBGhow0Z6/lbRVHDJyK M0j1LbliacRMsUQ5NMrTRytiXGTMBMPeSXJFq22Nu5n7O278WJCAp/tFLBuizg0LkM2lSjZw5sVR8 tL2PGtC4PJ1I2tBa0hNCVYRYvc5pa8Ldd0FPTOWGRVeodjtLM7dHBF4wLurTT3SBzSwsgOU9ye2+9 0YvqME3Nz9FG/1QYtnkfeLS2l3MqSJ0yLSeDBL0mClGRZjrqhXWOZObsRZVs8SlNQ7ZFeTJyCYW51 0uCjzr1w==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1qBcSy-00DBum-Oq; Tue, 20 Jun 2023 14:36:20 +0000 Date: Tue, 20 Jun 2023 15:36:20 +0100 From: Matthew Wilcox To: stsp Cc: Jeff Layton , linux-kernel@vger.kernel.org, Chuck Lever , Alexander Viro , Christian Brauner , linux-fsdevel@vger.kernel.org Subject: Re: [PATCH 2/3] fd/locks: allow get the lock owner by F_OFD_GETLK Message-ID: References: <5728ebda22a723b0eb209ae078e8f132d7b4ac7b.camel@kernel.org> <5f644a24-90b5-a02f-b593-49336e8e0f5a@yandex.ru> <2eb8566726e95a01536b61a3b8d0343379092b94.camel@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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 Tue, Jun 20, 2023 at 06:47:31PM +0500, stsp wrote: > > 20.06.2023 18:46, Matthew Wilcox пишет: > > On Tue, Jun 20, 2023 at 06:39:07PM +0500, stsp wrote: > > > Though it will, for sure, represent the > > > task that _owns_ the lock. > > No, it *DOESN'T*. I can open a file, SCM_RIGHTS pass it to another task > > and then exit. Now the only owner of that lock is the recipient ... > Won't I get the recipient's pid in an > l_pid then? You snipped the part where I pointed out that at times there can be _no_ task that owns it. open a fd, set the lock, pass the fd to another task, exit. until that task calls recvmsg(), no task owns it.