diff options
-rw-r--r-- | ext2fs/ialloc.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/ext2fs/ialloc.c b/ext2fs/ialloc.c index 716a1f7d..1386af81 100644 --- a/ext2fs/ialloc.c +++ b/ext2fs/ialloc.c @@ -312,6 +312,11 @@ diskfs_alloc_node (struct node *dir, mode_t mode, struct node **node) np->dn_set_ctime = 1; } + /* Propagate initial inode flags from the directory, as Linux does. */ + np->dn->info.i_flags = dir->dn->info.i_flags; + if (S_ISLNK (mode)) + np->dn->info.i_flags &= ~(EXT2_IMMUTABLE_FL | EXT2_APPEND_FL); + st->st_flags = 0; /* |