]> git.hungrycats.org Git - linux/commitdiff
[PATCH] dm: Drop extra table ref-count
authorKevin Corry <kevcorry@us.ibm.com>
Mon, 22 Sep 2003 15:35:08 +0000 (08:35 -0700)
committerLinus Torvalds <torvalds@home.osdl.org>
Mon, 22 Sep 2003 15:35:08 +0000 (08:35 -0700)
When multiple load ioctls are issued the reference count on older
'new_tables' wasn't being dropped.  [Christophe Saout]

drivers/md/dm-ioctl-v4.c

index 0ea9a58b8daf15d05a6ad184af0ce2aebd27c0f0..11dd7efd6b4af2b5d23a8aa31b2e8204e3062bbc 100644 (file)
@@ -817,6 +817,8 @@ static int table_load(struct dm_ioctl *param, size_t param_size)
                return -ENXIO;
        }
 
+       if (hc->new_map)
+               dm_table_put(hc->new_map);
        hc->new_map = t;
        param->flags |= DM_INACTIVE_PRESENT_FLAG;