mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* Assuming NULL
@ 2005-06-11 16:24 Jan Engelhardt
  2005-06-11 16:49 ` Måns Rullgård
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Jan Engelhardt @ 2005-06-11 16:24 UTC (permalink / raw)
  To: Linux Kernel Mailing List

Hi developers,



some places in fs/*.c have conditions like

(namei.c, 238, in "int permission()"):
        if(inode->i_op && inode->i_op->permission)

Others just have
(namei.c, 813, in "int fastcall link_path_walk()"):
        if(!inode->i_op->lookup)

My question is: Which one is right wrt the case "i_op ==/!= NULL"?
There are two ways:

- the kernel assumes i_op (and similar) is always non-NULL
  => then we can remove a lot of checks, like the first example above

- the kernel does not assume...
  => then we need some extra checks, like in the second example above



Jan Engelhardt                                                               
--                                                                            
| Gesellschaft fuer Wissenschaftliche Datenverarbeitung Goettingen,
| Am Fassberg, 37077 Goettingen, www.gwdg.de

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2005-06-11 17:32 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-06-11 16:24 Assuming NULL Jan Engelhardt
2005-06-11 16:49 ` Måns Rullgård
2005-06-11 17:17   ` Jan Engelhardt
2005-06-11 17:24 ` Willy Tarreau
2005-06-11 17:30 ` Christoph Hellwig

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®