]>
Commit | Line | Data |
---|---|---|
00e5a55c BS |
1 | From: Mikulas Patocka <mpatocka@redhat.com> |
2 | Subject: dm table: drop reference at unbind | |
3 | References: bnc#457205 | |
4 | Patch-mainline: 2.6.28-rc4 | |
5 | Signed-off-by: Nikanth Karthikesan <knikanth@suse.de> | |
6 | ||
7 | [PATCH 2/3] for bnc 457205 | |
8 | ||
9 | mainline commit a1b51e98676932d031f5eec1325b2df4bbdc8f26 | |
10 | ||
11 | ||
12 | Move one dm_table_put() so that the last reference in the thread | |
13 | gets dropped in __unbind(). | |
14 | ||
15 | This is required for a following patch, | |
16 | dm-table-rework-reference-counting.patch, which will change the logic in | |
17 | such a way that table destructor is called only at specific points in | |
18 | the code. | |
19 | ||
20 | Signed-off-by: Mikulas Patocka <mpatocka@redhat.com> | |
21 | Signed-off-by: Alasdair G Kergon <agk@redhat.com> | |
22 | ||
23 | Index: linux-2.6.27/drivers/md/dm.c | |
24 | =================================================================== | |
25 | --- linux-2.6.27.orig/drivers/md/dm.c | |
26 | +++ linux-2.6.27/drivers/md/dm.c | |
27 | @@ -2055,8 +2055,8 @@ void dm_put(struct mapped_device *md) | |
28 | dm_table_presuspend_targets(map); | |
29 | dm_table_postsuspend_targets(map); | |
30 | } | |
31 | - __unbind(md); | |
32 | dm_table_put(map); | |
33 | + __unbind(md); | |
34 | free_dev(md); | |
35 | } | |
36 | } |