Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1451009 > unrolled thread
| Started by | Salah Triki <salah.triki@gmail.com> |
|---|---|
| First post | 2016-07-27 04:40 +0200 |
| Last post | 2016-07-27 17:30 +0200 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
[RESEND PATCH V3] fs: befs: Insert NULL inode to dentry Salah Triki <salah.triki@gmail.com> - 2016-07-27 04:40 +0200
Re: [RESEND PATCH V3] fs: befs: Insert NULL inode to dentry Luis de Bethencourt <luisbg@osg.samsung.com> - 2016-07-27 17:30 +0200
| From | Salah Triki <salah.triki@gmail.com> |
|---|---|
| Date | 2016-07-27 04:40 +0200 |
| Subject | [RESEND PATCH V3] fs: befs: Insert NULL inode to dentry |
| Message-ID | <rZmVj-1U9-3@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@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) {
--
1.9.1
[toc] | [next] | [standalone]
| From | Luis de Bethencourt <luisbg@osg.samsung.com> |
|---|---|
| Date | 2016-07-27 17:30 +0200 |
| Message-ID | <rZyWu-19P-11@gated-at.bofh.it> |
| In reply to | #1451009 |
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
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web