From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751049AbcFDThU (ORCPT ); Sat, 4 Jun 2016 15:37:20 -0400 Received: from zeniv.linux.org.uk ([195.92.253.2]:46372 "EHLO ZenIV.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750911AbcFDThN (ORCPT ); Sat, 4 Jun 2016 15:37:13 -0400 Date: Sat, 4 Jun 2016 20:37:11 +0100 From: Al Viro To: Salah Triki Cc: akpm@linux-foundation.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/3] fs: befs: Lookup must return error code only on real error Message-ID: <20160604193711.GC14480@ZenIV.linux.org.uk> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.6.0 (2016-04-01) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Jun 04, 2016 at 07:53:19PM +0100, Salah Triki wrote: > File not found is not an error and lookup must return error code only > on real error, otherwise creating inodes with functions like create, > mkdir and so on will fail. You do realize that befs is read-only and doesn't have ->mkdir() and friends, right? Patch is almost correct (you want d_add(dentry, NULL) if you go that way, or you'll be calling ->lookup() ever time anyway), but it doesn't make much sense on its own.