mirror of
https://github.com/apache/nuttx.git
synced 2026-05-23 23:28:29 +08:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user