lkml.org 
[lkml]   [2022]   [Feb]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH 06/12] btrfs: change lockdep class size check using ks->names
    On Tue, Feb 08, 2022 at 10:42:02AM -0800, Namhyung Kim wrote:
    > With upcoming lock tracepoints config, it'd allow some lockdep
    > annotation code without enabling CONFIG_LOCKDEP actually. In that
    > config, size of the struct lock_class_key would be 0.
    >
    > But it'd cause divide-by-zero in btrfs_set_buffer_lockdep_class() due
    > to ARRAY_SIZE macro. Let's change it to use ks->names[] instead. It
    > should have the same size as with ks->keys[].
    >
    > Cc: Chris Mason <clm@fb.com>
    > Cc: Josef Bacik <josef@toxicpanda.com>
    > Cc: David Sterba <dsterba@suse.com>
    > Cc: linux-btrfs@vger.kernel.org
    > Signed-off-by: Namhyung Kim <namhyung@kernel.org>

    Acked-by: David Sterba <dsterba@suse.com>

    \
     
     \ /
      Last update: 2022-02-08 20:07    [W:2.118 / U:0.044 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site