From: "Serge E. Hallyn" <serge@hallyn.com>
To: Jan Engelhardt <jengelh@linux01.gwdg.de>, greg@kroah.com
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: securityfs_create_dir strange comment
Date: Tue, 20 Feb 2007 15:18:49 -0600 [thread overview]
Message-ID: <20070220211849.GA3416@vino.hallyn.com> (raw)
In-Reply-To: <Pine.LNX.4.61.0702181642060.28890@yvahk01.tjqt.qr>
Quoting Jan Engelhardt (jengelh@linux01.gwdg.de):
> Hello list,
>
>
> in security/inode.c, the comment for securityfs_create_dir() reads:
>
> If securityfs is not enabled in the kernel, the value -ENODEV
> will be returned. It is not wise to check for this value, but
> rather, check for NULL or !NULL instead as to eliminate the need
> for #ifdef in the calling code.
>
> What is the actual callee that can return NULL - and what should
> module_init() of a module return when securityfs_create_dir() returns
> NULL?
Hmm, this came from GregKH. It does seem based on the code that
checking for -ENODEV is necessary, so I don't understand the comment.
thanks,
-serge
next prev parent reply other threads:[~2007-02-20 21:19 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-02-18 15:45 Jan Engelhardt
2007-02-20 21:18 ` Serge E. Hallyn [this message]
2007-02-20 22:26 ` Greg KH
2007-02-20 23:45 ` Jan Engelhardt
2007-02-21 4:05 ` Greg KH
2007-02-21 17:07 ` Jan Engelhardt
2007-02-21 17:29 ` Greg KH
2007-02-21 17:46 ` Jan Engelhardt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20070220211849.GA3416@vino.hallyn.com \
--to=serge@hallyn.com \
--cc=greg@kroah.com \
--cc=jengelh@linux01.gwdg.de \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®