Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1413853

[PATCH V2 2/3] fs: befs: Insert NULL inode to dentry

From Salah Triki <salah.triki@acm.org>
Newsgroups linux.kernel
Subject [PATCH V2 2/3] fs: befs: Insert NULL inode to dentry
Date 2016-06-04 22:00 +0200
Message-ID <rGpTH-5eI-19@gated-at.bofh.it> (permalink)
References <rGpTH-5eI-11@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


As VFS expects, lookup should insert NULL inode to dentry when the named
inode does not exist.

Signed-off-by: Salah Triki <salah.triki@acm.org>
---
 fs/befs/linuxvfs.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/fs/befs/linuxvfs.c b/fs/befs/linuxvfs.c
index e0bd6c7..91740dd 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 NULL;
 
 	} else if (ret != BEFS_OK || offset == 0) {
-- 
1.9.1

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH V2 1/3] fs: befs: Lookup must return error code only on real error Salah Triki <salah.triki@acm.org> - 2016-06-04 22:00 +0200
  [PATCH V2 2/3] fs: befs: Insert NULL inode to dentry Salah Triki <salah.triki@acm.org> - 2016-06-04 22:00 +0200
  [PATCH V2 3/3] fs: befs: Increment i_count when inode is found Salah Triki <salah.triki@acm.org> - 2016-06-04 22:00 +0200

csiph-web