linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [ANNOUNCE] Make fs operations const
@ 2003-10-31 13:49 Matthew Wilcox
  0 siblings, 0 replies; only message in thread
From: Matthew Wilcox @ 2003-10-31 13:49 UTC (permalink / raw)
  To: linux-fsdevel; +Cc: linux-kernel


The 54k patch at http://ftp.linux.org.uk/pub/linux/willy/patches/fs-const.diff
makes many file_operations, dentry_operations, address_space_operations,
inode_operations, super_operations and dquot_operations const.

This was inspired by intermezzo doing something naughty which the
compiler didn't know to warn about.  By making these pointers point to
const structs, the compiler knows we shouldn't be doing that and will
issue a warning.

As a bonus for the embedded people, this enables us to move more of the
kernel into ROMmable sections.  I've only done this for ext2 and a few
well-known *_operations in this patch, but it could be done to many
more filesystems.  It only saves a few hundred bytes per filesystem,
but it all adds up.

-- 
"It's not Hollywood.  War is real, war is primarily not about defeat or
victory, it is about death.  I've seen thousands and thousands of dead bodies.
Do you think I want to have an academic debate on this subject?" -- Robert Fisk

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2003-10-31 13:49 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-10-31 13:49 [ANNOUNCE] Make fs operations const Matthew Wilcox

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).