aio: safeguard O_CLOEXEC

This commit is contained in:
Thomas Schoebel-Theuer 2021-02-16 07:00:43 +01:00 committed by Thomas Schoebel-Theuer
parent 8544ef4117
commit 8626dce8b0
1 changed files with 1 additions and 0 deletions

View File

@ -172,6 +172,7 @@ struct mapfree_info *mapfree_get(const char *name, int flags, int *error)
struct list_head *tmp;
unsigned int hash = mf_hash(name);
flags |= O_CLOEXEC;
if (!(flags & O_DIRECT)) {
down_read(&mf_table[hash].hash_mutex);
for (tmp = mf_table[hash].hash_anchor.next;