From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.kernel.org ([198.145.29.99]:33490 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750800AbeETJEZ (ORCPT ); Sun, 20 May 2018 05:04:25 -0400 Date: Sun, 20 May 2018 11:04:07 +0200 From: Greg KH To: Kai Krakow Cc: colyli@suse.de, axboe@kernel.dk, kent.overstreet@gmail.com, massimo.b@gmx.net, stable@vger.kernel.org Subject: Re: FAILED: patch "[PATCH] bcache: return 0 from bch_debug_init() if CONFIG_DEBUG_FS=n" failed to apply to 4.16-stable tree Message-ID: <20180520090407.GA17965@kroah.com> References: <152680254554207@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: stable-owner@vger.kernel.org List-ID: On Sun, May 20, 2018 at 10:59:32AM +0200, Kai Krakow wrote: > Hey Greg! > > The v1 version applied for me but it shows a compiler warning. I didn't try > the newer version yet. > > I could prepare a back-ported version. Backported would be good. Also, the code really is wrong even with this change. No code path should ever do anything different if debugfs is enabled or not, or based on the return value of a debugfs call. No need to check anything here at all, the function should be: void __init bch_debug_init(void) { bcache_debug = debugfs_create_dir("bcache", NULL); } That's it, no checking, and all is fine and good. Any result of a debugfs call can always be fed back into another debugfs call with no harm or errors happening. thanks, greg k-h