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


Groups > linux.kernel > #1413859 > unrolled thread

[PATCH V3] fs: befs: Insert NULL inode to dentry

Started bySalah Triki <salah.triki@acm.org>
First post2016-06-04 22:30 +0200
Last post2016-06-04 22:30 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel


Contents

  [PATCH V3] fs: befs: Insert NULL inode to dentry Salah Triki <salah.triki@acm.org> - 2016-06-04 22:30 +0200

#1413859 — [PATCH V3] fs: befs: Insert NULL inode to dentry

FromSalah Triki <salah.triki@acm.org>
Date2016-06-04 22:30 +0200
Subject[PATCH V3] fs: befs: Insert NULL inode to dentry
Message-ID<rGqmJ-5EY-1@gated-at.bofh.it>
As VFS expects, lookup inserts 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 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) {
-- 
1.9.1

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web