mirror of
https://github.com/apache/nuttx.git
synced 2026-05-09 23:12:17 +08: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:
+5
-1
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user