fs: befs: Insert NULL inode to dentry
authorSalah Triki <salah.triki@gmail.com>
Wed, 27 Jul 2016 02:35:59 +0000 (03:35 +0100)
committerLuis de Bethencourt <luisbg@osg.samsung.com>
Sat, 8 Oct 2016 09:01:21 +0000 (10:01 +0100)
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>
Acked-by: Luis de Bethencourt <luisbg@osg.samsung.com>
fs/befs/linuxvfs.c

index 67669a8..ebfc9f0 100644 (file)
@@ -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) {