~vcs-imports/hurd/trunk

« back to all changes in this revision

Viewing changes to ext2fs/ialloc.c

  • Committer: Samuel Thibault
  • Date: 2011-12-27 23:28:35 UTC
  • Revision ID: git-v1:e3372f9819e603914db63aa8aed1293488c5299d
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.

Show diffs side-by-side

added added

removed removed

Lines of Context:
315
315
    }
316
316
 
317
317
  /* Propagate initial inode flags from the directory, as Linux does.  */
318
 
  np->dn->info.i_flags = dir->dn->info.i_flags;
319
 
  if (S_ISLNK (mode))
320
 
     np->dn->info.i_flags &= ~(EXT2_IMMUTABLE_FL | EXT2_APPEND_FL);
 
318
  np->dn->info.i_flags =
 
319
    ext2_mask_flags(mode, dir->dn->info.i_flags & EXT2_FL_INHERITED);
321
320
 
322
321
  st->st_flags = 0;
323
322