mynewt-nffs
mynewt-nffs copied to clipboard
Invalid inode cache in nffs_write_append()
;; Even though README says we must report to Jira, I found that Jira is deprecated. So here I go.
nffs_write_append()
gets a pointer to struct nffs_cache_inode
as the first argument. Unfortunately, the function calls nffs_block_entry_reserve()
as the first thing in the the function. Because nffs_block_entry_reserve()
might invalidate the given cache in low memory situation, subsequent accesses to the cache must be protected by nffs_cache_inode_ensure()
.