#include "union.h"
-/* increase the superblock generation count; effectively invalidating every
- * upper inode, dentry and file object */
-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);
-
- gen = atomic_inc_return(&UNIONFS_SB(sb)->generation);
-
- atomic_set(&UNIONFS_D(sb->s_root)->generation, gen);
- atomic_set(&UNIONFS_I(sb->s_root->d_inode)->generation, gen);
-
- unionfs_write_unlock(sb);
-
- return gen;
-}
-
/* return to userspace the branch indices containing the file in question
*
* We use fd_set and therefore we are limited to the number of the branches
switch (cmd) {
case UNIONFS_IOCTL_INCGEN:
/* Increment the superblock generation count */
- err = -EACCES;
- if (!capable(CAP_SYS_ADMIN))
- goto out;
- err = unionfs_ioctl_incgen(file, cmd, arg);
+ printk("unionfs: incgen ioctl deprecated; use \"-o remount,incgen\"\n");
+ err = -ENOSYS;
break;
case UNIONFS_IOCTL_QUERYFILE: