From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from merlin.infradead.org ([205.233.59.134]:53186 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726170AbeJ2Co1 (ORCPT ); Sun, 28 Oct 2018 22:44:27 -0400 Date: Sun, 28 Oct 2018 18:58:40 +0100 From: Peter Zijlstra To: Dave Chinner Cc: Bart Van Assche , Alexander Viro , linux-fsdevel@vger.kernel.org, Johannes Berg , Ingo Molnar , Theodore Ts'o Subject: Re: [PATCH RFC] kernel/locking, fs/direct-io: Introduce and use down_write_nolockdep() Message-ID: <20181028175840.GA744@hirez.programming.kicks-ass.net> References: <20181026164905.214474-1-bvanassche@acm.org> <20181027053745.GI6311@dastard> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20181027053745.GI6311@dastard> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Sat, Oct 27, 2018 at 04:37:45PM +1100, Dave Chinner wrote: > As an API, however, this needs to be consistent with > down_read_non_owner()/up_read_non_owner() which are for exactly this > same issue issue (different acquire/release contexts) on the read > side of the rwsem. Indeed, it can probably use the same > infrastructure... Indeed. Also, from a quick look, this has been broken for donkeys years, right? That comment: /* will be released by direct_io_worker */ has been there since 2009. Back then of course it was a mutex, and the curious thing is, mutexes have _never_ supported this release from another context thing. Colour me confused.