@@ -472,7 +472,7 @@ static struct file_operations proc_mountstats_operations = {
472472static ssize_t proc_info_read (struct file * file , char __user * buf ,
473473 size_t count , loff_t * ppos )
474474{
475- struct inode * inode = file -> f_dentry -> d_inode ;
475+ struct inode * inode = file -> f_path . dentry -> d_inode ;
476476 unsigned long page ;
477477 ssize_t length ;
478478 struct task_struct * task = get_proc_task (inode );
@@ -512,7 +512,7 @@ static int mem_open(struct inode* inode, struct file* file)
512512static ssize_t mem_read (struct file * file , char __user * buf ,
513513 size_t count , loff_t * ppos )
514514{
515- struct task_struct * task = get_proc_task (file -> f_dentry -> d_inode );
515+ struct task_struct * task = get_proc_task (file -> f_path . dentry -> d_inode );
516516 char * page ;
517517 unsigned long src = * ppos ;
518518 int ret = - ESRCH ;
@@ -584,7 +584,7 @@ static ssize_t mem_write(struct file * file, const char * buf,
584584{
585585 int copied ;
586586 char * page ;
587- struct task_struct * task = get_proc_task (file -> f_dentry -> d_inode );
587+ struct task_struct * task = get_proc_task (file -> f_path . dentry -> d_inode );
588588 unsigned long dst = * ppos ;
589589
590590 copied = - ESRCH ;
@@ -654,7 +654,7 @@ static struct file_operations proc_mem_operations = {
654654static ssize_t oom_adjust_read (struct file * file , char __user * buf ,
655655 size_t count , loff_t * ppos )
656656{
657- struct task_struct * task = get_proc_task (file -> f_dentry -> d_inode );
657+ struct task_struct * task = get_proc_task (file -> f_path . dentry -> d_inode );
658658 char buffer [PROC_NUMBUF ];
659659 size_t len ;
660660 int oom_adjust ;
@@ -694,7 +694,7 @@ static ssize_t oom_adjust_write(struct file *file, const char __user *buf,
694694 return - EINVAL ;
695695 if (* end == '\n' )
696696 end ++ ;
697- task = get_proc_task (file -> f_dentry -> d_inode );
697+ task = get_proc_task (file -> f_path . dentry -> d_inode );
698698 if (!task )
699699 return - ESRCH ;
700700 if (oom_adjust < task -> oomkilladj && !capable (CAP_SYS_RESOURCE )) {
@@ -718,7 +718,7 @@ static struct file_operations proc_oom_adjust_operations = {
718718static ssize_t proc_loginuid_read (struct file * file , char __user * buf ,
719719 size_t count , loff_t * ppos )
720720{
721- struct inode * inode = file -> f_dentry -> d_inode ;
721+ struct inode * inode = file -> f_path . dentry -> d_inode ;
722722 struct task_struct * task = get_proc_task (inode );
723723 ssize_t length ;
724724 char tmpbuf [TMPBUFLEN ];
@@ -734,7 +734,7 @@ static ssize_t proc_loginuid_read(struct file * file, char __user * buf,
734734static ssize_t proc_loginuid_write (struct file * file , const char __user * buf ,
735735 size_t count , loff_t * ppos )
736736{
737- struct inode * inode = file -> f_dentry -> d_inode ;
737+ struct inode * inode = file -> f_path . dentry -> d_inode ;
738738 char * page , * tmp ;
739739 ssize_t length ;
740740 uid_t loginuid ;
@@ -1078,7 +1078,7 @@ static int proc_fill_cache(struct file *filp, void *dirent, filldir_t filldir,
10781078 char * name , int len ,
10791079 instantiate_t instantiate , struct task_struct * task , void * ptr )
10801080{
1081- struct dentry * child , * dir = filp -> f_dentry ;
1081+ struct dentry * child , * dir = filp -> f_path . dentry ;
10821082 struct inode * inode ;
10831083 struct qstr qname ;
10841084 ino_t ino = 0 ;
@@ -1157,8 +1157,8 @@ static int proc_fd_link(struct inode *inode, struct dentry **dentry, struct vfsm
11571157 spin_lock (& files -> file_lock );
11581158 file = fcheck_files (files , fd );
11591159 if (file ) {
1160- * mnt = mntget (file -> f_vfsmnt );
1161- * dentry = dget (file -> f_dentry );
1160+ * mnt = mntget (file -> f_path . mnt );
1161+ * dentry = dget (file -> f_path . dentry );
11621162 spin_unlock (& files -> file_lock );
11631163 put_files_struct (files );
11641164 return 0 ;
@@ -1293,7 +1293,7 @@ static int proc_fd_fill_cache(struct file *filp, void *dirent, filldir_t filldir
12931293
12941294static int proc_readfd (struct file * filp , void * dirent , filldir_t filldir )
12951295{
1296- struct dentry * dentry = filp -> f_dentry ;
1296+ struct dentry * dentry = filp -> f_path . dentry ;
12971297 struct inode * inode = dentry -> d_inode ;
12981298 struct task_struct * p = get_proc_task (inode );
12991299 unsigned int fd , tid , ino ;
@@ -1440,7 +1440,7 @@ static int proc_pident_readdir(struct file *filp,
14401440{
14411441 int i ;
14421442 int pid ;
1443- struct dentry * dentry = filp -> f_dentry ;
1443+ struct dentry * dentry = filp -> f_path . dentry ;
14441444 struct inode * inode = dentry -> d_inode ;
14451445 struct task_struct * task = get_proc_task (inode );
14461446 struct pid_entry * p , * last ;
@@ -1496,7 +1496,7 @@ static int proc_pident_readdir(struct file *filp,
14961496static ssize_t proc_pid_attr_read (struct file * file , char __user * buf ,
14971497 size_t count , loff_t * ppos )
14981498{
1499- struct inode * inode = file -> f_dentry -> d_inode ;
1499+ struct inode * inode = file -> f_path . dentry -> d_inode ;
15001500 unsigned long page ;
15011501 ssize_t length ;
15021502 struct task_struct * task = get_proc_task (inode );
@@ -1512,7 +1512,7 @@ static ssize_t proc_pid_attr_read(struct file * file, char __user * buf,
15121512 goto out ;
15131513
15141514 length = security_getprocattr (task ,
1515- (char * )file -> f_dentry -> d_name .name ,
1515+ (char * )file -> f_path . dentry -> d_name .name ,
15161516 (void * )page , count );
15171517 if (length >= 0 )
15181518 length = simple_read_from_buffer (buf , count , ppos , (char * )page , length );
@@ -1526,7 +1526,7 @@ static ssize_t proc_pid_attr_read(struct file * file, char __user * buf,
15261526static ssize_t proc_pid_attr_write (struct file * file , const char __user * buf ,
15271527 size_t count , loff_t * ppos )
15281528{
1529- struct inode * inode = file -> f_dentry -> d_inode ;
1529+ struct inode * inode = file -> f_path . dentry -> d_inode ;
15301530 char * page ;
15311531 ssize_t length ;
15321532 struct task_struct * task = get_proc_task (inode );
@@ -1552,7 +1552,7 @@ static ssize_t proc_pid_attr_write(struct file * file, const char __user * buf,
15521552 goto out_free ;
15531553
15541554 length = security_setprocattr (task ,
1555- (char * )file -> f_dentry -> d_name .name ,
1555+ (char * )file -> f_path . dentry -> d_name .name ,
15561556 (void * )page , count );
15571557out_free :
15581558 free_page ((unsigned long ) page );
@@ -1994,7 +1994,7 @@ static int proc_pid_fill_cache(struct file *filp, void *dirent, filldir_t filldi
19941994int proc_pid_readdir (struct file * filp , void * dirent , filldir_t filldir )
19951995{
19961996 unsigned int nr = filp -> f_pos - FIRST_PROCESS_ENTRY ;
1997- struct task_struct * reaper = get_proc_task (filp -> f_dentry -> d_inode );
1997+ struct task_struct * reaper = get_proc_task (filp -> f_path . dentry -> d_inode );
19981998 struct task_struct * task ;
19991999 int tgid ;
20002000
@@ -2235,7 +2235,7 @@ static int proc_task_fill_cache(struct file *filp, void *dirent, filldir_t filld
22352235/* for the /proc/TGID/task/ directories */
22362236static int proc_task_readdir (struct file * filp , void * dirent , filldir_t filldir )
22372237{
2238- struct dentry * dentry = filp -> f_dentry ;
2238+ struct dentry * dentry = filp -> f_path . dentry ;
22392239 struct inode * inode = dentry -> d_inode ;
22402240 struct task_struct * leader = get_proc_task (inode );
22412241 struct task_struct * task ;
0 commit comments