Re: [PATCH 28/31] Constify struct super_operations for 2.6.32 v1

From: Emese Revfy
Date: Sat Dec 05 2009 - 20:39:58 EST


Al Viro wrote:
> On Fri, Dec 04, 2009 at 11:47:15PM +0100, Emese Revfy wrote:
>> From: Emese Revfy <re.emese@xxxxxxxxx>
>>
>> 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

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/