aio: do not follow symlinks on O_CREAT

This commit is contained in:
Thomas Schoebel-Theuer 2020-07-28 17:55:01 +02:00
parent ee4258ccfc
commit 3883b2bf10
1 changed files with 2 additions and 1 deletions

View File

@ -1197,8 +1197,9 @@ static int aio_switch(struct aio_brick *brick)
mars_power_led_off((void*)brick, false);
flags |= O_LARGEFILE;
if (brick->o_creat) {
flags |= O_CREAT;
flags |= (O_NOFOLLOW | O_CREAT);
MARS_DBG("using O_CREAT on %s\n", path);
}
if (brick->o_direct) {