… | |
… | |
1305 | flags &= ~(EIO_READDIR_DIRS_FIRST | EIO_READDIR_STAT_ORDER); |
1305 | flags &= ~(EIO_READDIR_DIRS_FIRST | EIO_READDIR_STAT_ORDER); |
1306 | |
1306 | |
1307 | X_LOCK (wrklock); |
1307 | X_LOCK (wrklock); |
1308 | /* the corresponding closedir is in ETP_WORKER_CLEAR */ |
1308 | /* the corresponding closedir is in ETP_WORKER_CLEAR */ |
1309 | self->dirp = dirp = opendir (req->ptr1); |
1309 | self->dirp = dirp = opendir (req->ptr1); |
|
|
1310 | |
|
|
1311 | if (req->flags & EIO_FLAG_PTR1_FREE) |
|
|
1312 | free (req->ptr1); |
1310 | |
1313 | |
1311 | req->flags |= EIO_FLAG_PTR1_FREE | EIO_FLAG_PTR2_FREE; |
1314 | req->flags |= EIO_FLAG_PTR1_FREE | EIO_FLAG_PTR2_FREE; |
1312 | req->ptr1 = dents = flags ? malloc (dentalloc * sizeof (eio_dirent)) : 0; |
1315 | req->ptr1 = dents = flags ? malloc (dentalloc * sizeof (eio_dirent)) : 0; |
1313 | req->ptr2 = names = malloc (namesalloc); |
1316 | req->ptr2 = names = malloc (namesalloc); |
1314 | X_UNLOCK (wrklock); |
1317 | X_UNLOCK (wrklock); |