am 00615f01: Merge "Allow mkdir() race to succeed." into jb-mr1-dev
* commit '00615f017bcc4be5a6ce02f1eeeebe59dbd381df': Allow mkdir() race to succeed.
This commit is contained in:
commit
10f35e876a
|
@ -55,8 +55,10 @@ int fs_prepare_dir(const char* path, mode_t mode, uid_t uid, gid_t gid) {
|
|||
|
||||
create:
|
||||
if (TEMP_FAILURE_RETRY(mkdir(path, mode)) == -1) {
|
||||
ALOGE("Failed to mkdir(%s): %s", path, strerror(errno));
|
||||
return -1;
|
||||
if (errno != EEXIST) {
|
||||
ALOGE("Failed to mkdir(%s): %s", path, strerror(errno));
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
fixup:
|
||||
|
|
Loading…
Reference in New Issue