/* this is common implementation of set_plug_in_inode method of file plugin */ int set_plug_in_inode_common(struct inode *object /* inode to set plugin on */ , struct inode *parent /* parent object */ , reiser4_object_create_data * data /* creational * data */ ) { __u64 mask; object->i_mode = data->mode; /* this should be plugin decision */ object->i_uid = current->cred->fsuid; object->i_mtime = object->i_atime = object->i_ctime = CURRENT_TIME; /* support for BSD style group-id assignment. See mount's manual page description of bsdgroups ext2 mount options for more details */ if (reiser4_is_set(object->i_sb, REISER4_BSD_GID)) object->i_gid = parent->i_gid; else if (parent->i_mode & S_ISGID) { /* parent directory has sguid bit */ object->i_gid = parent->i_gid; if (S_ISDIR(object->i_mode)) /* sguid is inherited by sub-directories */ object->i_mode |= S_ISGID; } else object->i_gid = current->cred->fsgid; /* this object doesn't have stat-data yet */ reiser4_inode_set_flag(object, REISER4_NO_SD); #if 0 /* this is now called after all inode plugins are initialized: do_create_vfs_child after adjust_to_parent */ /* setup inode and file-operations for this inode */ setup_inode_ops(object, data); #endif object->i_nlink = 0; reiser4_seal_init(&reiser4_inode_data(object)->sd_seal, NULL, NULL); mask = (1 << UNIX_STAT) | (1 << LIGHT_WEIGHT_STAT); if (!reiser4_is_set(object->i_sb, REISER4_32_BIT_TIMES)) mask |= (1 << LARGE_TIMES_STAT); reiser4_inode_data(object)->extmask = mask; return 0; }
static inline int reiser4_use_write_barrier(struct super_block * s) { return !reiser4_is_set(s, REISER4_NO_WRITE_BARRIER); }