Commit f05c4403 authored by Mike Snitzer's avatar Mike Snitzer

dm: fix double RCU unlock in dm_dax_zero_page_range() error path

Remove redundant dm_put_live_table() in dm_dax_zero_page_range() error
path to fix sparse warning:
drivers/md/dm.c:1208:9: warning: context imbalance in 'dm_dax_zero_page_range' - unexpected unlock

Fixes: cdf6cdcd ("dm,dax: Add dax zero_page_range operation")
Cc: stable@vger.kernel.org
Signed-off-by: default avatarMike Snitzer <snitzer@redhat.com>
parent 3ee16db3
...@@ -1201,11 +1201,9 @@ static int dm_dax_zero_page_range(struct dax_device *dax_dev, pgoff_t pgoff, ...@@ -1201,11 +1201,9 @@ static int dm_dax_zero_page_range(struct dax_device *dax_dev, pgoff_t pgoff,
* ->zero_page_range() is mandatory dax operation. If we are * ->zero_page_range() is mandatory dax operation. If we are
* here, something is wrong. * here, something is wrong.
*/ */
dm_put_live_table(md, srcu_idx);
goto out; goto out;
} }
ret = ti->type->dax_zero_page_range(ti, pgoff, nr_pages); ret = ti->type->dax_zero_page_range(ti, pgoff, nr_pages);
out: out:
dm_put_live_table(md, srcu_idx); dm_put_live_table(md, srcu_idx);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment