We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 73b4fc1 commit 3a8be27Copy full SHA for 3a8be27
dfs_lfs.c
@@ -576,7 +576,6 @@ static int _dfs_lfs_open(struct dfs_file* file)
576
return -ENOENT;
577
}
578
file->pos = 0;
579
- return 0;
580
581
582
dfs_lfs = (dfs_lfs_t*)dfs->data;
@@ -691,10 +690,6 @@ static int _dfs_lfs_close(struct dfs_file* file)
691
690
RT_ASSERT(file->data != RT_NULL);
692
693
RT_ASSERT(file->vnode->ref_count > 0);
694
- if (file->vnode->ref_count > 1)
695
- {
696
697
- }
698
699
dfs_lfs_fd = (dfs_lfs_fd_t*)file->data;
700
@@ -714,6 +709,7 @@ static int _dfs_lfs_close(struct dfs_file* file)
714
709
715
710
716
711
rt_free(dfs_lfs_fd);
712
+ file->data = RT_NULL;
717
713
718
return _lfs_result_to_dfs(result);
719
0 commit comments