mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
proc: remove useless d_is_dir() check
Remove the d_is_dir() check from tgid_pidfd_to_pid(). It is pointless since you should never get &proc_tgid_base_operations for f_op on a non-directory. Suggested-by: Al Viro <[email protected]> Signed-off-by: Christian Brauner <[email protected]>
This commit is contained in:
parent
6fd2fe494b
commit
30d158b143
1 changed files with 1 additions and 2 deletions
|
|
@ -3077,8 +3077,7 @@ static const struct file_operations proc_tgid_base_operations = {
|
|||
|
||||
struct pid *tgid_pidfd_to_pid(const struct file *file)
|
||||
{
|
||||
if (!d_is_dir(file->f_path.dentry) ||
|
||||
(file->f_op != &proc_tgid_base_operations))
|
||||
if (file->f_op != &proc_tgid_base_operations)
|
||||
return ERR_PTR(-EBADF);
|
||||
|
||||
return proc_pid(file_inode(file));
|
||||
|
|
|
|||
Loading…
Reference in a new issue