Unionfs: Fix incorrect opaque dir detection in unionfs_do_rmdir
authorRachita Kothiyal <rachita@louie.fsl.cs.sunysb.edu>
Tue, 27 Nov 2007 20:04:29 +0000 (15:04 -0500)
committerRachita Kothiyal <rachita@dewey.fsl.cs.sunysb.edu>
Thu, 1 May 2008 23:03:22 +0000 (19:03 -0400)
Fix unionfs_do_rmdir() to recognize opaque directories correctly
for creating whiteouts.

Signed-off-by: Rachita Kothiyal(rachita@fsl.cs.sunysb.edu)
fs/unionfs/unlink.c

index d888c6f62320027354c23d8563961c1288f84ff0..9e55dfe388e4c757f7e386af82ff72ea26b85a55 100644 (file)
@@ -192,7 +192,7 @@ static int unionfs_do_rmdir(struct inode *dir, struct dentry *dentry)
         * FIXME: create wh for opaque dirs as well? or force to check all
         * branches?
         */
-       if (err || odf_get_opaque(dentry) != 1) {
+       if (err || odf_get_opaque(dentry) != -1) {
                if (err == -EIO)
                        printk(KERN_WARNING "unionfs: rmdir: IO error "
                               "removing from branch %d\n", bindex);