Unionfs: do not over-decrement lower superblock refs on remount
authorRachita Kothiyal <rachita@dewey.fsl.cs.sunysb.edu>
Mon, 31 Mar 2008 20:09:25 +0000 (16:09 -0400)
committerRachita Kothiyal <rachita@dewey.fsl.cs.sunysb.edu>
Mon, 31 Mar 2008 20:09:25 +0000 (16:09 -0400)
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
fs/unionfs/super.c

index 54c25f9a668ab656fdbffbf5469bc0210a0bc9c4..6741510964d376519cb0bd6a9a1f339225f80e4c 100644 (file)
@@ -773,7 +773,7 @@ out_no_change:
        /* grab new lower super references; release old ones */
        for (i = 0; i < new_branches; i++)
                atomic_inc(&new_data[i].sb->s_active);
-       for (i = 0; i < new_branches; i++)
+       for (i = 0; i < sbmax(sb); i++)
                atomic_dec(&UNIONFS_SB(sb)->data[i].sb->s_active);
 
        /* copy new vectors into their correct place */