fs/pseudofs: Add missing bumping of inode refcount
When a new pseudofile is created, the inode reference count needs to be bumped to protect the node. Signed-off-by: Ville Juven <ville.juven@unikie.com>
This commit is contained in:
parent
c37a270cda
commit
3fe1d1a54d
1 changed files with 1 additions and 0 deletions
|
|
@ -493,6 +493,7 @@ int pseudofile_create(FAR struct inode **node, FAR const char *path,
|
|||
(*node)->i_flags = 1;
|
||||
(*node)->u.i_ops = &g_pseudofile_ops;
|
||||
(*node)->i_private = pf;
|
||||
atomic_fetch_add(&(*node)->i_crefs, 1);
|
||||
|
||||
inode_unlock();
|
||||
#ifdef CONFIG_FS_NOTIFY
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue