public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Luis de Bethencourt <luisbg@osg.samsung.com>
To: Salah Triki <salah.triki@gmail.com>, 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
Date: Wed, 27 Jul 2016 16:27:10 +0100	[thread overview]
Message-ID: <5798D2CE.6000509@osg.samsung.com> (raw)
In-Reply-To: <1469586959-11091-1-git-send-email-salah.triki@gmail.com>

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 <salah.triki@gmail.com>
> ---
>  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 <luisbg@osg.samsung.com>

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

      reply	other threads:[~2016-07-27 15:27 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-27  2:35 [RESEND PATCH V3] fs: befs: Insert NULL inode to dentry Salah Triki
2016-07-27 15:27 ` Luis de Bethencourt [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5798D2CE.6000509@osg.samsung.com \
    --to=luisbg@osg.samsung.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mhocko@suse.com \
    --cc=salah.triki@gmail.com \
    --cc=vdavydov@virtuozzo.com \
    --cc=viro@ZenIV.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox