GIT: unionfs2-2.6.27.y: Unionfs: Remove the older incgen ioctl

Erez Zadok ezk at fsl.cs.sunysb.edu
Thu Aug 12 23:15:59 EDT 2010


commit addc742f98eccdcc5474c1d43167f01ed45c3feb
Author: Josef 'Jeff' Sipek <jsipek at cs.sunysb.edu>
Date:   Sun Mar 18 16:22:03 2007 -0400

    Unionfs: Remove the older incgen ioctl
    
    The new remount code now has the "incgen" functionality.
    
    Signed-off-by: Josef 'Jeff' Sipek <jsipek at cs.sunysb.edu>

diff --git a/fs/unionfs/branchman.c b/fs/unionfs/branchman.c
index 83d443a..6912be9 100644
--- a/fs/unionfs/branchman.c
+++ b/fs/unionfs/branchman.c
@@ -18,27 +18,6 @@
 
 #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
diff --git a/fs/unionfs/commonfops.c b/fs/unionfs/commonfops.c
index 6606cba..8453f2d 100644
--- a/fs/unionfs/commonfops.c
+++ b/fs/unionfs/commonfops.c
@@ -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:


More information about the unionfs-cvs mailing list