diff options
Diffstat (limited to 'fs/proc/base.c')
-rw-r--r-- | fs/proc/base.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/proc/base.c b/fs/proc/base.c index 9c8ca6cd3ce4..255f6754c70d 100644 --- a/fs/proc/base.c +++ b/fs/proc/base.c | |||
@@ -3077,8 +3077,7 @@ static const struct file_operations proc_tgid_base_operations = { | |||
3077 | 3077 | ||
3078 | struct pid *tgid_pidfd_to_pid(const struct file *file) | 3078 | struct pid *tgid_pidfd_to_pid(const struct file *file) |
3079 | { | 3079 | { |
3080 | if (!d_is_dir(file->f_path.dentry) || | 3080 | if (file->f_op != &proc_tgid_base_operations) |
3081 | (file->f_op != &proc_tgid_base_operations)) | ||
3082 | return ERR_PTR(-EBADF); | 3081 | return ERR_PTR(-EBADF); |
3083 | 3082 | ||
3084 | return proc_pid(file_inode(file)); | 3083 | return proc_pid(file_inode(file)); |