Unionfs: fix off-by-one but in mkdir
authorErez Zadok <ezk@cs.sunysb.edu>
Fri, 19 Sep 2008 23:26:55 +0000 (19:26 -0400)
committerErez Zadok <ezk@cs.sunysb.edu>
Fri, 19 Sep 2008 23:26:55 +0000 (19:26 -0400)
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
fs/unionfs/inode.c

index ccd93184f96baed1e6c92730ca709b18f1bb7aeb..5321b36b44d540cd9c01bb08ab8b6fe472ba1c7e 100644 (file)
@@ -510,7 +510,7 @@ static int unionfs_mkdir(struct inode *parent, struct dentry *dentry, int mode)
                if (err)
                        break;
 
-               for (i = bindex + 1; i < bend; i++) {
+               for (i = bindex + 1; i <= bend; i++) {
                        if (unionfs_lower_dentry_idx(dentry, i)) {
                                dput(unionfs_lower_dentry_idx(dentry, i));
                                unionfs_set_lower_dentry_idx(dentry, i, NULL);