[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <8b29764b-3a5d-4a5b-8910-5d33f17bdae6@I-love.SAKURA.ne.jp>
Date: Tue, 24 Jun 2025 10:17:45 +0900
From: Tetsuo Handa <penguin-kernel@...ove.SAKURA.ne.jp>
To: Heming Zhao <heming.zhao@...e.com>
Cc: Mark Fasheh <mark@...heh.com>, Joel Becker <jlbec@...lplan.org>,
Joseph Qi <joseph.qi@...ux.alibaba.com>, ocfs2-devel@...ts.linux.dev,
LKML <linux-kernel@...r.kernel.org>,
Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [PATCH] ocfs2: embed actual values into ocfs2_sysfile_lock_key
names
On 2025/06/24 9:38, Heming Zhao wrote:
> Hello,
>
> Just from your code logic, the switch is unnecessary, and converting
> the input parameter into an "unsigned int" type is sufficient.
>
> e.g.: (not test)
>
> unsigned int type = args->fi_sysfile_type;
>
> if (args->fi_sysfile_type != 0)
> lockdep_set_class(&inode->i_rwsem,
> &ocfs2_sysfile_lock_key[type]);
Excuse me, but you missed the point.
Your approach results in showing "type" instead of "args->fi_sysfile_type".
&ocfs2_sysfile_lock_key[type] --> jbd2_handle --> &oi->ip_xattr_sem
The point of this change is to show the actual value instead of variable name.
>> Before:
>>
>> &ocfs2_sysfile_lock_key[args->fi_sysfile_type] --> jbd2_handle --> &oi->ip_xattr_sem
>>
>> After:
>>
>> &ocfs2_sysfile_lock_key[EXTENT_ALLOC_SYSTEM_INODE] --> jbd2_handle --> &oi->ip_xattr_sem
>>
Powered by blists - more mailing lists