mirror of https://github.com/schoebel/mars
aio: safeguard O_CLOEXEC
This commit is contained in:
parent
8544ef4117
commit
8626dce8b0
|
@ -172,6 +172,7 @@ struct mapfree_info *mapfree_get(const char *name, int flags, int *error)
|
||||||
struct list_head *tmp;
|
struct list_head *tmp;
|
||||||
unsigned int hash = mf_hash(name);
|
unsigned int hash = mf_hash(name);
|
||||||
|
|
||||||
|
flags |= O_CLOEXEC;
|
||||||
if (!(flags & O_DIRECT)) {
|
if (!(flags & O_DIRECT)) {
|
||||||
down_read(&mf_table[hash].hash_mutex);
|
down_read(&mf_table[hash].hash_mutex);
|
||||||
for (tmp = mf_table[hash].hash_anchor.next;
|
for (tmp = mf_table[hash].hash_anchor.next;
|
||||||
|
|
Loading…
Reference in New Issue