dm bufio: don't take the lock in dm_bufio_shrink_count
authorMikulas Patocka <mpatocka@redhat.com>
Wed, 23 Nov 2016 21:52:01 +0000 (16:52 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 11 Jul 2018 14:26:46 +0000 (16:26 +0200)
commit4779184af75437c83c7ac5f257fa0db1fe1ed9b7
treeb3ce31b4fe0770039e02dbd6d458b8f26e29c6ed
parent9d1304f5816db4cc96cab6e5cceb75054cb841c5
dm bufio: don't take the lock in dm_bufio_shrink_count

commit d12067f428c037b4575aaeb2be00847fc214c24a upstream.

dm_bufio_shrink_count() is called from do_shrink_slab to find out how many
freeable objects are there. The reported value doesn't have to be precise,
so we don't need to take the dm-bufio lock.

Suggested-by: David Rientjes <rientjes@google.com>
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/md/dm-bufio.c