Use of i_security in fs/nfs/inode.c
Subsystems (2)
There is a check for inode->i_security == NULL in nfs_setsecurity in fs/nfs/inode.c. What is the intent of this check? Are you looking for an uninitialized security blob, are you looking to see if there is an active security module or something else?
Is there any reason that you can see that a call to security_inode_getsecid() followed by a check to see if the secid == 0 would not be equivalent? I understand that the NULL check is faster, but it may not always be correct.