mirror of
https://github.com/drasko/codezero.git
synced 2026-04-03 10:39:04 +02:00
File opener count was not decreased in vm_file_put
This commit is contained in:
@@ -510,7 +510,7 @@ int fsync_common(struct tcb *task, int fd)
|
||||
void vm_file_put(struct vm_file *file)
|
||||
{
|
||||
/* Reduce file's opener count */
|
||||
if (!(file->openers))
|
||||
if (!(file->openers--))
|
||||
/* No openers left, check any mappers */
|
||||
if (!file->vm_obj.nlinks)
|
||||
/* No links or openers, delete the file */
|
||||
|
||||
Reference in New Issue
Block a user