* Kostik Belousov <kostik...@gmail.com> wrote:
> On Mon, Aug 23, 2010 at 03:35:55PM +0200, Ed Schouten wrote:
> > * Kostik Belousov <kostik...@gmail.com> wrote:
> > > Which most likely means that fusesfs filled its own struct fileops
> > > without properly initializing fo_truncate member.
> > 
> > It's a bit misleading that cdevs automatically patch the table, while
> > the fileops don't. Maybe it would be a good idea to patch finit() to
> I do not understand your first sentence. Would you please elaborate ?

Say, you create a cdev, if you don't implement all ops, it will check
for null pointers and return error codes accordingly. This doesn't
happen for fileops, which is probably one of the reasons why people
sometimes forget to implement them.

Wouldn't it be better to prevent this form of footshooting by adding
assertions? This will add some overhead for any file descriptor created,
but a kernel with INVARIANTS isn't meant to be fast.

-- 
 Ed Schouten <e...@80386.nl>
 WWW: http://80386.nl/

Attachment: pgpM8zdFvppwk.pgp
Description: PGP signature

Reply via email to