From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S941298AbcKOH2t (ORCPT ); Tue, 15 Nov 2016 02:28:49 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:49190 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S941035AbcKOH2p (ORCPT ); Tue, 15 Nov 2016 02:28:45 -0500 Date: Tue, 15 Nov 2016 08:28:55 +0100 From: Greg KH To: Christoph Hellwig Cc: Peter Zijlstra , keescook@chromium.org, will.deacon@arm.com, elena.reshetova@intel.com, arnd@arndb.de, tglx@linutronix.de, mingo@kernel.org, hpa@zytor.com, dave@progbits.org, linux-kernel@vger.kernel.org Subject: Re: [RFC][PATCH 2/7] kref: Add kref_read() Message-ID: <20161115072855.GB28248@kroah.com> References: <20161114173946.501528675@infradead.org> <20161114174446.486581399@infradead.org> <20161114181655.GA21516@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20161114181655.GA21516@infradead.org> User-Agent: Mutt/1.7.1 (2016-10-04) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Nov 14, 2016 at 10:16:55AM -0800, Christoph Hellwig wrote: > On Mon, Nov 14, 2016 at 06:39:48PM +0100, Peter Zijlstra wrote: > > Since we need to change the implementation, stop exposing internals. > > > > Provide kref_read() to read the current reference count; typically > > used for debug messages. > > Can we just provide a printk specifier for a kref value instead as > that is the only valid use case for reading the value? Yeah, that would be great as no one should be doing anything logic-related based on the kref value. thanks, greg k-h