Unionfs: Remove the older incgen ioctl
authorJosef 'Jeff' Sipek <jsipek@cs.sunysb.edu>
Sun, 18 Mar 2007 20:22:03 +0000 (16:22 -0400)
committerErez Zadok <ezk@cs.sunysb.edu>
Thu, 16 Jun 2011 22:41:02 +0000 (15:41 -0700)
The new remount code now has the "incgen" functionality.

Signed-off-by: Josef 'Jeff' Sipek <jsipek@cs.sunysb.edu>
fs/unionfs/branchman.c
fs/unionfs/commonfops.c

index 83d443ac5a856cfafa90da464ecd6007a2a3fa8a..6912be969973a4d209d580166b680901542f3a88 100644 (file)
 
 #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
index 6606cba1f96e8b4547a8bfba21899af98c6333d8..8453f2dbae4156de0de243db7950355fc47a3b46 100644 (file)
@@ -623,10 +623,8 @@ long unionfs_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
        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: