[lkml]   [1998]   [Aug]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: 2.1.118 Tons of oopes
In article <>,
<> wrote:
> wrote:
>>Richard Gooch wrote:
>>> Yes, I can see the benefit of avoiding the NULL check. It would be
>>> nice to be able to do this. However, that would then require every
>>> driver to be updated on every addition of a new VFS method.
>>It's possible, in the NULL case, that the check is faster than the
>>function call to the default function.
>Which is a rather bogus argument, trying to call a VFS method which
>is NULL usually indicates an error and isn't time critical.

No, some functions are NULL quite normally, simply because it's
something that the low-level driver or FS doesn't want to bother with.

For example, networked filesystems often need more hooks to tell the
system that "ok, something changed", while a local filesystem doesn't
need that and can just let the VFS layer do whatever it wants to do
without having to worry about anybody else doing something over the

As such, NULL pointers can often be the _default_ rather than being a
sign of error cases. And the NULL case may be the fast and
timing-sensitive one. This is true of the dcache hashing stuff, for
example, where there are special (and slow) routines for certain
filesystems that want to do stupid name mangling.


To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:44    [W:0.129 / U:5.200 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site