]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
dm table: drop reference at unbind
authorMikulas Patocka <mpatocka@redhat.com>
Tue, 6 Jan 2009 03:04:53 +0000 (03:04 +0000)
committerAlasdair G Kergon <agk@redhat.com>
Tue, 6 Jan 2009 03:04:53 +0000 (03:04 +0000)
Move one dm_table_put() so that the last reference in the thread
gets dropped in __unbind().

This is required for a following patch,
dm-table-rework-reference-counting.patch, which will change the logic in
such a way that table destructor is called only at specific points in
the code.

Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
drivers/md/dm.c

index 421c9f02d8ca7329c41168e7beb5f1c2b3a6c6d1..82371412029f8a8e1cb697db5a25aae25974af34 100644 (file)
@@ -1330,8 +1330,8 @@ void dm_put(struct mapped_device *md)
                        dm_table_presuspend_targets(map);
                        dm_table_postsuspend_targets(map);
                }
-               __unbind(md);
                dm_table_put(map);
+               __unbind(md);
                free_dev(md);
        }
 }