lkml.org 
[lkml]   [2010]   [Oct]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH 11/18] fs: Introduce per-bucket inode hash locks
Date
Nick Piggin <npiggin@kernel.dk> writes:
>
>> Providing
>> locking wrappers that are exactly what users need so they don't have
>> to care about it is, IMO, the right thing to do.
>
> Hiding the type of lock, and hiding the fact that it sets the low bit?
> I don't agree. We don't have synchronization in our data structures,
> where possible, because it is just restrictive or goes wrong when people
> don't think enough about the locking.

I fully agree. The old skb lists in networking made this mistake
long ago and it was a big problem, until people essentially stopped
using it (always using __ variants) and it was eventually removed.

Magic locking in data structures is usually a bad idea.

-Andi

--
ak@linux.intel.com -- Speaking for myself only.


\
 
 \ /
  Last update: 2010-10-18 18:19    [W:0.179 / U:0.876 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site