This is an automated email from the ASF dual-hosted git repository.
xiaoxiang781216 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git
The following commit(s) were added to refs/heads/master by this push:
new 62b71c3b304 fs/vfs/fs_lock.c: Close stale locks unconditionally
62b71c3b304 is described below
commit 62b71c3b3041fadd985899abe669e78f08ad0574
Author: Jari Nippula <[email protected]>
AuthorDate: Fri Apr 24 14:44:17 2026 +0300
fs/vfs/fs_lock.c: Close stale locks unconditionally
Allow to close the lock even the dying task is in
signal handler context. Also the file type check can
be ignored as they are already validated in create phase.
Signed-off-by: Jari Nippula <[email protected]>
---
fs/vfs/fs_lock.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/fs/vfs/fs_lock.c b/fs/vfs/fs_lock.c
index f685eace90c..535b35ec39f 100644
--- a/fs/vfs/fs_lock.c
+++ b/fs/vfs/fs_lock.c
@@ -784,7 +784,11 @@ void file_closelk(FAR struct file *filep)
return;
}
- ret = file_lock_get_path(filep, path);
+ /* No need for inode type and signal handler context (e.g. "kill") checking
+ * here, but just get path unconditionally.
+ */
+
+ ret = file_fcntl(filep, F_GETPATH, path);
if (ret < 0)
{
/* It isn't an error if fs doesn't support F_GETPATH, so we just end