From 24a77a392d40f7f389b34347a15cd972e01011bc Mon Sep 17 00:00:00 2001 From: wdfk-prog <1425075683@qq.com> Date: Sat, 25 Oct 2025 15:06:18 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E9=87=8D=E5=A4=8D=E6=89=93=E5=BC=80?= =?UTF-8?q?=E6=96=87=E4=BB=B6=E5=87=BA=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dfs_lfs.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/dfs_lfs.c b/dfs_lfs.c index 96f97d9f..22a44515 100644 --- a/dfs_lfs.c +++ b/dfs_lfs.c @@ -576,7 +576,6 @@ static int _dfs_lfs_open(struct dfs_file* file) return -ENOENT; } file->pos = 0; - return 0; } dfs_lfs = (dfs_lfs_t*)dfs->data; @@ -691,10 +690,6 @@ static int _dfs_lfs_close(struct dfs_file* file) RT_ASSERT(file->data != RT_NULL); RT_ASSERT(file->vnode->ref_count > 0); - if (file->vnode->ref_count > 1) - { - return 0; - } dfs_lfs_fd = (dfs_lfs_fd_t*)file->data; @@ -714,6 +709,7 @@ static int _dfs_lfs_close(struct dfs_file* file) } rt_free(dfs_lfs_fd); + file->data = RT_NULL; return _lfs_result_to_dfs(result); }