From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757024AbcG0P1R (ORCPT ); Wed, 27 Jul 2016 11:27:17 -0400 Received: from ec2-52-27-115-49.us-west-2.compute.amazonaws.com ([52.27.115.49]:51940 "EHLO s-opensource.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754797AbcG0P1Q (ORCPT ); Wed, 27 Jul 2016 11:27:16 -0400 Message-ID: <5798D2CE.6000509@osg.samsung.com> Date: Wed, 27 Jul 2016 16:27:10 +0100 From: Luis de Bethencourt User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.8.0 MIME-Version: 1.0 To: Salah Triki , viro@ZenIV.linux.org.uk CC: akpm@linux-foundation.org, mhocko@suse.com, vdavydov@virtuozzo.com, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [RESEND PATCH V3] fs: befs: Insert NULL inode to dentry References: <1469586959-11091-1-git-send-email-salah.triki@gmail.com> In-Reply-To: <1469586959-11091-1-git-send-email-salah.triki@gmail.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 27/07/16 03:35, Salah Triki wrote: > As VFS expects, lookup inserts NULL inode to dentry when the named inode > does not exist. > > Signed-off-by: Salah Triki > --- > fs/befs/linuxvfs.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/fs/befs/linuxvfs.c b/fs/befs/linuxvfs.c > index c734f21..2fea87b 100644 > --- a/fs/befs/linuxvfs.c > +++ b/fs/befs/linuxvfs.c > @@ -184,6 +184,7 @@ befs_lookup(struct inode *dir, struct dentry *dentry, unsigned int flags) > > if (ret == BEFS_BT_NOT_FOUND) { > befs_debug(sb, "<--- %s %pd not found", __func__, dentry); > + d_add(dentry, NULL); > return ERR_PTR(-ENOENT); > > } else if (ret != BEFS_OK || offset == 0) { > Hi, The expectation Salah is mentioning can be seen in Documentation/filesystems/vfs.txt:383 "If the named inode does not exist a NULL inode should be inserted into the dentry (this is called a negative dentry)." Acked-by: Luis de Bethencourt I have applied this patch into [0]: https://github.com/luisbg/linux-befs/tree/befs-next Thanks, Luis [0] reason for the git branch: https://lkml.org/lkml/2016/7/26/533