aboutsummaryrefslogtreecommitdiff
path: root/ext2fs/ialloc.c
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2011-12-28 00:28:35 +0100
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2011-12-28 00:28:35 +0100
commite3372f9819e603914db63aa8aed1293488c5299d (patch)
treea4389a40e40c488243670388952361c641d2ecfc /ext2fs/ialloc.c
parentd88bebe601742481f5b244e08c0fa442ddbefbf2 (diff)
downloadhurd-e3372f9819e603914db63aa8aed1293488c5299d.tar.gz
hurd-e3372f9819e603914db63aa8aed1293488c5299d.tar.bz2
hurd-e3372f9819e603914db63aa8aed1293488c5299d.zip
Do not inherit all ext2fs flags
* ext2fs/ext2_fs.h (EXT2_FL_INHERITED, EXT2_REG_FLMASK, EXT2_OTHER_FLMASK): New macros. (ext2_mask_flags): New inline function. * ext2fs/ialloc.c (diskfs_alloc_node): Use EXT2_FL_INHERITED and call ext2_mask_flags.
Diffstat (limited to 'ext2fs/ialloc.c')
-rw-r--r--ext2fs/ialloc.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/ext2fs/ialloc.c b/ext2fs/ialloc.c
index 22d911b5..15c17a4e 100644
--- a/ext2fs/ialloc.c
+++ b/ext2fs/ialloc.c
@@ -315,9 +315,8 @@ diskfs_alloc_node (struct node *dir, mode_t mode, struct node **node)
}
/* 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);
+ np->dn->info.i_flags =
+ ext2_mask_flags(mode, dir->dn->info.i_flags & EXT2_FL_INHERITED);
st->st_flags = 0;