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 <jari.nippula@tii.ae>
This commit is contained in:
Jari Nippula
2026-04-24 14:44:17 +03:00
committed by Xiang Xiao
parent d619ee6541
commit 62b71c3b30
+5 -1
View File
@@ -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