fs: Fix null pointer exception caused by async fs_unmount
The mp pointer is in fs_file_t and fs_dir_t so if the fs pointer is made NULL then subsequent file I/O operations will cause a NULL pointer exception. Removing the mount point from the list is threadsafe and should be sufficient. Signed-off-by: Chris Desjardins <chris@arch-embedded.com>
This commit is contained in:
parent
f781d7a26f
commit
862af5e903
|
@ -815,9 +815,6 @@ int fs_unmount(struct fs_mount_t *mp)
|
|||
goto unmount_err;
|
||||
}
|
||||
|
||||
/* clear file system interface */
|
||||
mp->fs = NULL;
|
||||
|
||||
/* remove mount node from the list */
|
||||
sys_dlist_remove(&mp->node);
|
||||
LOG_DBG("fs unmounted from %s", mp->mnt_point);
|
||||
|
|
Loading…
Reference in New Issue