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

index 27fdf6a895a1153d1c7ab87c79dbae071b66929f..6f1cc314187e7943c1e008fd7326da3583c9ea2c 100644 (file)
@@ -517,7 +517,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);