lkml.org 
[lkml]   [2007]   [Feb]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: securityfs_create_dir strange comment
    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
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2007-02-20 22:21    [W:6.580 / U:0.680 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site