Commit f9a67b1
md/bitmap: clear bitmap if bitmap_create failed
If bitmap_create returns an error, we need to call
either bitmap_destroy or bitmap_free to do clean up,
and the selection is based on mddev->bitmap is set
or not.
And the sysfs_put(bitmap->sysfs_can_clear) is moved
from bitmap_destroy to bitmap_free, and the comment
of bitmap_create is changed as well.
Signed-off-by: Guoqing Jiang <gqjiang@suse.com>
Signed-off-by: Shaohua Li <shli@fb.com>1 parent ed3b98c commit f9a67b1
1 file changed
+11
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1673 | 1673 | | |
1674 | 1674 | | |
1675 | 1675 | | |
| 1676 | + | |
| 1677 | + | |
| 1678 | + | |
1676 | 1679 | | |
1677 | 1680 | | |
1678 | 1681 | | |
| |||
1712 | 1715 | | |
1713 | 1716 | | |
1714 | 1717 | | |
1715 | | - | |
1716 | | - | |
1717 | | - | |
1718 | 1718 | | |
1719 | 1719 | | |
1720 | 1720 | | |
1721 | 1721 | | |
1722 | 1722 | | |
1723 | 1723 | | |
| 1724 | + | |
1724 | 1725 | | |
1725 | 1726 | | |
1726 | 1727 | | |
| |||
1865 | 1866 | | |
1866 | 1867 | | |
1867 | 1868 | | |
1868 | | - | |
| 1869 | + | |
| 1870 | + | |
1869 | 1871 | | |
| 1872 | + | |
1870 | 1873 | | |
1871 | 1874 | | |
1872 | 1875 | | |
| |||
2170 | 2173 | | |
2171 | 2174 | | |
2172 | 2175 | | |
2173 | | - | |
2174 | | - | |
| 2176 | + | |
2175 | 2177 | | |
2176 | | - | |
2177 | 2178 | | |
2178 | 2179 | | |
2179 | | - | |
| 2180 | + | |
| 2181 | + | |
2180 | 2182 | | |
| 2183 | + | |
2181 | 2184 | | |
2182 | 2185 | | |
2183 | 2186 | | |
| |||
0 commit comments