lkml.org 
[lkml]   [2009]   [Dec]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 28/31] Constify struct super_operations for 2.6.32 v1
Al Viro wrote:
> On Fri, Dec 04, 2009 at 11:47:15PM +0100, Emese Revfy wrote:
>> From: Emese Revfy <re.emese@gmail.com>
>>
>> Constify struct super_operations.
>
> What the _hell_ is that?
>
>> + struct inode *(* const alloc_inode)(struct super_block *sb);
>
> This is ugly and has all marks of cargo-cult patches. NAKed at least
> until you give exceptionally good reasons for doing that.

My idea was that since each instance of super_operations is const,
I figured that there is an implicit policy of not wanting writable
super_operations structures in the kernel. If this is actually the
case then my patch makes the compiler enforce this policy, otherwise
please ignore it.
--
Emese



\
 
 \ /
  Last update: 2009-12-06 02:43    [W:1.670 / U:0.184 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site