dm table: fix missing dm_put_target_type() in dm_table_add_target()
dm_get_target_type() was previously called so any error returned from dm_table_add_target() must first call dm_put_target_type(). Otherwise the DM target module's reference count will leak and the associated kernel module will be unable to be removed. Also, leverage the fact that r is already -EINVAL and remove an extra newline. Fixes: 36a0456f ("dm table: add immutable feature") Fixes: cc6cbe14 ("dm table: add always writeable feature") Fixes: 3791e2fc ("dm table: add singleton feature") Cc: stable@vger.kernel.org # 3.2+ Signed-off-by: Ntang.junhui <tang.junhui@zte.com.cn> Signed-off-by: NMike Snitzer <snitzer@redhat.com>
Showing
想要评论请 注册 或 登录