mirror of
https://github.com/apache/nuttx.git
synced 2026-08-01 20:28:58 +00:00
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:
parent
d619ee6541
commit
62b71c3b30
1 changed files with 5 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue