From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 13BDD4C63; Wed, 12 Jun 2024 08:09:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718179795; cv=none; b=bm8FfxnjmZyBPovB7Lo7xCLpkPM20AhWtRaX3yiYG3EqMYoDHiyJ2mY5ZHeXOlScOW7dRd9nNrq0JgoRo3LV9iWRih+4qypTLWSObxhQzgp5Ukom9+tB/vd6V8I3i42fqbY0BmhWhabXsFYP3Ioj6xpM6MEMgwf6oFfxG9qHYP0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718179795; c=relaxed/simple; bh=LH2QVR8RIElSNdKCwQD7JEh8pcjMKW0aQHLDo1mJV/I=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=Y3dB9DHnvgFXyW9j8BC0CkltpkyeA8JQXl6Yppig4zrqhdVvNBTV6w+bxedafNcr1W+uAv1Ua2z1fc2mQi00wCvZb8ddaT5GOFsfTbawmKSq7ZsrQdRW/lmPt/Sd3QZdDn6JHc2RjiEXE1VnUj8kulZF6HHkNPAamAL/fCZCGq0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=RzkkBTBA; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="RzkkBTBA" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0E1B6C3277B; Wed, 12 Jun 2024 08:09:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1718179794; bh=LH2QVR8RIElSNdKCwQD7JEh8pcjMKW0aQHLDo1mJV/I=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=RzkkBTBA235rwtWwycIQj2KqVbizGP8wNzoEnhUb4cLSNRP9uK7hGXKcoL0q4iykq t9N0SiPmsqQsiLntlpTpWYkxZQU3y8l3mrAjBndh7BKHKocqhTEJ/OfeDFP15pqTQ/ bvSdTeTNmYUQIldzhRBCA7igwF4H6CcWlAaqxHTw= Date: Wed, 12 Jun 2024 10:09:51 +0200 From: Greg Kroah-Hartman To: Martin Oliveira Cc: linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, Jason Gunthorpe , Leon Romanovsky , Tejun Heo , Andrew Morton , Logan Gunthorpe , Mike Marciniszyn , Shiraz Saleem , Michael Guralnik , Artemy Kovalyov Subject: Re: [PATCH v2 1/4] kernfs: remove page_mkwrite() from vm_operations_struct Message-ID: <2024061242-puzzling-implicit-e64e@gregkh> References: <20240611182732.360317-1-martin.oliveira@eideticom.com> <20240611182732.360317-2-martin.oliveira@eideticom.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240611182732.360317-2-martin.oliveira@eideticom.com> On Tue, Jun 11, 2024 at 12:27:29PM -0600, Martin Oliveira wrote: > The .page_mkwrite operator of kernfs just calls file_update_time(). > This is the same behaviour that the fault code does if .page_mkwrite is > not set. > > Furthermore, having the page_mkwrite() operator causes > writable_file_mapping_allowed() to fail due to > vma_needs_dirty_tracking() on the gup flow, which is a pre-requisite for > enabling P2PDMA over RDMA. > > There are no users of .page_mkwrite and no known valid use cases, so > just remove the .page_mkwrite from kernfs_ops and return -EINVAL if an > mmap() implementation sets .page_mkwrite. > > Co-developed-by: Logan Gunthorpe > Signed-off-by: Logan Gunthorpe > Signed-off-by: Martin Oliveira > --- > fs/kernfs/file.c | 26 +++----------------------- > 1 file changed, 3 insertions(+), 23 deletions(-) Acked-by: Greg Kroah-Hartman