diff options
Diffstat (limited to 'security/selinux/hooks.c')
-rw-r--r-- | security/selinux/hooks.c | 9 |
1 files changed, 0 insertions, 9 deletions
diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c index 84b591711eec..2fa28c88900c 100644 --- a/security/selinux/hooks.c +++ b/security/selinux/hooks.c | |||
@@ -3135,11 +3135,6 @@ static int selinux_file_fcntl(struct file *file, unsigned int cmd, | |||
3135 | 3135 | ||
3136 | switch (cmd) { | 3136 | switch (cmd) { |
3137 | case F_SETFL: | 3137 | case F_SETFL: |
3138 | if (!file->f_path.dentry || !file->f_path.dentry->d_inode) { | ||
3139 | err = -EINVAL; | ||
3140 | break; | ||
3141 | } | ||
3142 | |||
3143 | if ((file->f_flags & O_APPEND) && !(arg & O_APPEND)) { | 3138 | if ((file->f_flags & O_APPEND) && !(arg & O_APPEND)) { |
3144 | err = file_has_perm(cred, file, FILE__WRITE); | 3139 | err = file_has_perm(cred, file, FILE__WRITE); |
3145 | break; | 3140 | break; |
@@ -3162,10 +3157,6 @@ static int selinux_file_fcntl(struct file *file, unsigned int cmd, | |||
3162 | case F_SETLK64: | 3157 | case F_SETLK64: |
3163 | case F_SETLKW64: | 3158 | case F_SETLKW64: |
3164 | #endif | 3159 | #endif |
3165 | if (!file->f_path.dentry || !file->f_path.dentry->d_inode) { | ||
3166 | err = -EINVAL; | ||
3167 | break; | ||
3168 | } | ||
3169 | err = file_has_perm(cred, file, FILE__LOCK); | 3160 | err = file_has_perm(cred, file, FILE__LOCK); |
3170 | break; | 3161 | break; |
3171 | } | 3162 | } |