Explorar o código

fs: befs: Insert NULL inode to dentry

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>
Salah Triki %!s(int64=9) %!d(string=hai) anos
pai
achega
a26bc1adc7
Modificáronse 1 ficheiros con 1 adicións e 0 borrados
  1. 1 0
      fs/befs/linuxvfs.c

+ 1 - 0
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) {