Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp2988804pxa; Tue, 18 Aug 2020 03:40:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyS6a7V98OY7QaEhDnC39uInonlKryZbvvzwC+5S3RU+PfpGFuf5tb8neOwTjDby3Ifkwc8 X-Received: by 2002:a05:6402:b45:: with SMTP id bx5mr515201edb.22.1597747243419; Tue, 18 Aug 2020 03:40:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597747243; cv=none; d=google.com; s=arc-20160816; b=ZoxK9YcUg5twHwQqlKsyTRq1j0A3xFCy3ASbUi8VV6w5fPqv7ZqOTSQD4OfsyqdYA5 MUQoSBtjc0Xel0WWYA1TIM6U36e5a5B8EH7p8sQIHrxc9wZxXOqRE95xB82ekT86R501 waW+Wq54ACRjNkUIR7QutMNVwHEARHmrinaW19s8LVS3LrZ1gRX/OPEuDJYgCIGhYbvk 9IwCoBc8T7BzbCfrA+ZdrrKLXBatncYJhbiQ+ftvspLd0EFMkJcHsPswYi3j39HWI7fJ QwqSE02e9E6cyiV7e3Coq5GIhdKkLFeSBy+j5pUxqCiSSy3q2ehVHDqAy1B9aT9S1Lqt AHKw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=qLbY+0r7CseIlo6XA2QFYDjM2hi7fPpIdN1/bj3qH6I=; b=CmE/bwWe3U2Xj5ALrRrAMGeRS3Wggg6l5yQDeOB/EvzdyqtTkMV+sdewhzo9nnkjHJ +L1VazzF7Gl2TWn8cfunzywNOaBBePvWF0zNzVKeIqxeE4g5EYc1i0uM1Jh64/ry6Ngq AblM3z/TsyiTpbw56sblfnPcM60DQjc0JMt5dqe36i3aaIzm9ovO7w8JFqVeJNOm4/nv FZJKV15Qje0mUYfcXBzheAbjVRR8C+TxekHymZKKfNdzEkrTwypJn1un5VF5QRmVmevG ju8A877kNcYj2Z2ZEY5otkHy5Z1X5PLsRTiVvseQqcby6qWCl6tXuPodcQ2gcyK66tWv KkGA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id od24si13651314ejb.630.2020.08.18.03.40.19; Tue, 18 Aug 2020 03:40:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726746AbgHRKjn (ORCPT + 99 others); Tue, 18 Aug 2020 06:39:43 -0400 Received: from youngberry.canonical.com ([91.189.89.112]:39184 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726420AbgHRKjm (ORCPT ); Tue, 18 Aug 2020 06:39:42 -0400 Received: from ip5f5af70b.dynamic.kabel-deutschland.de ([95.90.247.11] helo=wittgenstein) by youngberry.canonical.com with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1k7z1o-0003Lw-76; Tue, 18 Aug 2020 10:39:40 +0000 Date: Tue, 18 Aug 2020 12:39:38 +0200 From: Christian Brauner To: "Eric W. Biederman" Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, criu@openvz.org, bpf@vger.kernel.org, Linus Torvalds , Alexander Viro , Oleg Nesterov , Cyrill Gorcunov , Jann Horn , Kees Cook , Daniel =?utf-8?B?UC4gQmVycmFuZ8Op?= , Jeff Layton , Miklos Szeredi , Matthew Wilcox , "J. Bruce Fields" , Matthew Wilcox , Trond Myklebust , Chris Wright , Alexei Starovoitov , Daniel Borkmann , Martin KaFai Lau , Song Liu , Yonghong Song , Andrii Nakryiko , John Fastabend , KP Singh Subject: Re: [PATCH 13/17] file: Remove get_files_struct Message-ID: <20200818103938.6zdyz7ppodvsse34@wittgenstein> References: <87ft8l6ic3.fsf@x220.int.ebiederm.org> <20200817220425.9389-13-ebiederm@xmission.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20200817220425.9389-13-ebiederm@xmission.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Aug 17, 2020 at 05:04:21PM -0500, Eric W. Biederman wrote: > When discussing[1] exec and posix file locks it was realized that none > of the callers of get_files_struct fundamentally needed to call > get_files_struct, and that by switching them to helper functions > instead it will both simplify their code and remove unnecessary > increments of files_struct.count. Those unnecessary increments can > result in exec unnecessarily unsharing files_struct which breaking > posix locks, and it can result in fget_light having to fallback to > fget reducing system performance. > > Now that get_files_struct has no more users and can not cause the > problems for posix file locking and fget_light remove get_files_struct > so that it does not gain any new users. > > [1] https://lkml.kernel.org/r/20180915160423.GA31461@redhat.com > Suggested-by: Oleg Nesterov > Signed-off-by: "Eric W. Biederman" > --- Acked-by: Christian Brauner