diff --git a/src/add-ons/kernel/file_systems/bfs/Inode.cpp b/src/add-ons/kernel/file_systems/bfs/Inode.cpp index 50762ad037..aa4a951216 100644 --- a/src/add-ons/kernel/file_systems/bfs/Inode.cpp +++ b/src/add-ons/kernel/file_systems/bfs/Inode.cpp @@ -990,7 +990,8 @@ Inode::CreateAttribute(Transaction &transaction, const char *name, uint32 type, { // do we need to create the attribute directory first? if (Attributes().IsZero()) { - status_t status = Inode::Create(transaction, this, NULL, S_ATTR_DIR | 0666, 0, 0, NULL); + status_t status = Inode::Create(transaction, this, NULL, + S_ATTR_DIR | S_DIRECTORY | 0666, 0, 0, NULL); if (status < B_OK) RETURN_ERROR(status); } @@ -1000,7 +1001,8 @@ Inode::CreateAttribute(Transaction &transaction, const char *name, uint32 type, return B_ERROR; // Inode::Create() locks the inode for us - return Inode::Create(transaction, attributes, name, S_ATTR | 0666, 0, type, NULL, attribute); + return Inode::Create(transaction, attributes, name, + S_ATTR | S_REGULAR | 0666, 0, type, NULL, attribute); } diff --git a/src/tests/add-ons/kernel/file_systems/bfs/r5/Inode.cpp b/src/tests/add-ons/kernel/file_systems/bfs/r5/Inode.cpp index 0b0ff0cafa..ebcc8c2b36 100644 --- a/src/tests/add-ons/kernel/file_systems/bfs/r5/Inode.cpp +++ b/src/tests/add-ons/kernel/file_systems/bfs/r5/Inode.cpp @@ -953,7 +953,8 @@ Inode::CreateAttribute(Transaction *transaction, const char *name, uint32 type, { // do we need to create the attribute directory first? if (Attributes().IsZero()) { - status_t status = Inode::Create(transaction, this, NULL, S_ATTR_DIR | 0666, 0, 0, NULL); + status_t status = Inode::Create(transaction, this, NULL, + S_ATTR_DIR | S_DIRECTORY | 0666, 0, 0, NULL); if (status < B_OK) RETURN_ERROR(status); } @@ -963,7 +964,8 @@ Inode::CreateAttribute(Transaction *transaction, const char *name, uint32 type, return B_ERROR; // Inode::Create() locks the inode for us - return Inode::Create(transaction, attributes, name, S_ATTR | 0666, 0, type, NULL, attribute); + return Inode::Create(transaction, attributes, name, + S_ATTR | S_REGULAR | 0666, 0, type, NULL, attribute); }