evm: fix security/security_old_init_security return code
authorMimi Zohar <zohar@linux.vnet.ibm.com>
Mon, 15 Aug 2011 14:13:18 +0000 (10:13 -0400)
committerMimi Zohar <zohar@linux.vnet.ibm.com>
Wed, 14 Sep 2011 19:24:50 +0000 (15:24 -0400)
security_inode_init_security previously returned -EOPNOTSUPP, for S_PRIVATE
inodes, and relied on the callers to change it to 0.  As the callers do not
change the return code anymore, return 0, intead of -EOPNOTSUPP.

Signed-off-by: Mimi Zohar <zohar@us.ibm.com>
security/security.c

index 9ebda054a33312482f7b868f7aec1e7990735c93..c1d69875db6c0a9fcc1a11b90d4d6711d794ff12 100644 (file)
@@ -348,7 +348,7 @@ int security_inode_init_security(struct inode *inode, struct inode *dir,
        int ret;
 
        if (unlikely(IS_PRIVATE(inode)))
-               return -EOPNOTSUPP;
+               return 0;
 
        memset(new_xattrs, 0, sizeof new_xattrs);
        if (!initxattrs)
@@ -381,7 +381,7 @@ int security_old_inode_init_security(struct inode *inode, struct inode *dir,
                                     void **value, size_t *len)
 {
        if (unlikely(IS_PRIVATE(inode)))
-               return -EOPNOTSUPP;
+               return 0;
        return security_ops->inode_init_security(inode, dir, qstr, name, value,
                                                 len);
 }