+struct dentry **alloc_new_dentries(int objs)
+{
+ if (!objs)
+ return NULL;
+
+ return kzalloc(sizeof(struct dentry *) * objs, GFP_KERNEL);
+struct unionfs_usi_data *alloc_new_data(int objs)
+{
+ if (!objs)
+ return NULL;
+
+ return kzalloc(sizeof(struct unionfs_usi_data) * objs, GFP_KERNEL);
+}
+int unionfs_ioctl_incgen(struct file *file, unsigned int cmd, unsigned long arg)
+{
+ struct super_block *sb;
+ int gen;
+
+ sb = file->f_dentry->d_sb;
+
+ unionfs_write_lock(sb);
+
+ atomic_inc(&stopd(sb)->usi_generation);
+ gen = atomic_read(&stopd(sb)->usi_generation);
+
+ atomic_set(&dtopd(sb->s_root)->udi_generation, gen);
+ atomic_set(&itopd(sb->s_root->d_inode)->uii_generation, gen);
+
+ unionfs_write_unlock(sb);
+
+ return gen;
+}