Loading fs/proc/inode.c +37 −35 Original line number Diff line number Diff line Loading @@ -619,15 +619,19 @@ struct inode *proc_get_inode(struct super_block *sb, struct proc_dir_entry *de) { struct inode *inode = new_inode(sb); if (inode) { if (!inode) { pde_put(de); return NULL; } inode->i_ino = de->low_ino; inode->i_mtime = inode->i_atime = inode->i_ctime = current_time(inode); PROC_I(inode)->pde = de; if (is_empty_pde(de)) { make_empty_dir_inode(inode); return inode; } if (de->mode) { inode->i_mode = de->mode; inode->i_uid = de->uid; Loading @@ -642,9 +646,8 @@ struct inode *proc_get_inode(struct super_block *sb, struct proc_dir_entry *de) inode->i_op = de->proc_iops; inode->i_fop = &proc_reg_file_ops; #ifdef CONFIG_COMPAT if (!de->proc_ops->proc_compat_ioctl) { if (!de->proc_ops->proc_compat_ioctl) inode->i_fop = &proc_reg_file_ops_no_compat; } #endif } else if (S_ISDIR(inode->i_mode)) { inode->i_op = de->proc_iops; Loading @@ -652,9 +655,8 @@ struct inode *proc_get_inode(struct super_block *sb, struct proc_dir_entry *de) } else if (S_ISLNK(inode->i_mode)) { inode->i_op = de->proc_iops; inode->i_fop = NULL; } else } else { BUG(); } else pde_put(de); } return inode; } Loading
fs/proc/inode.c +37 −35 Original line number Diff line number Diff line Loading @@ -619,15 +619,19 @@ struct inode *proc_get_inode(struct super_block *sb, struct proc_dir_entry *de) { struct inode *inode = new_inode(sb); if (inode) { if (!inode) { pde_put(de); return NULL; } inode->i_ino = de->low_ino; inode->i_mtime = inode->i_atime = inode->i_ctime = current_time(inode); PROC_I(inode)->pde = de; if (is_empty_pde(de)) { make_empty_dir_inode(inode); return inode; } if (de->mode) { inode->i_mode = de->mode; inode->i_uid = de->uid; Loading @@ -642,9 +646,8 @@ struct inode *proc_get_inode(struct super_block *sb, struct proc_dir_entry *de) inode->i_op = de->proc_iops; inode->i_fop = &proc_reg_file_ops; #ifdef CONFIG_COMPAT if (!de->proc_ops->proc_compat_ioctl) { if (!de->proc_ops->proc_compat_ioctl) inode->i_fop = &proc_reg_file_ops_no_compat; } #endif } else if (S_ISDIR(inode->i_mode)) { inode->i_op = de->proc_iops; Loading @@ -652,9 +655,8 @@ struct inode *proc_get_inode(struct super_block *sb, struct proc_dir_entry *de) } else if (S_ISLNK(inode->i_mode)) { inode->i_op = de->proc_iops; inode->i_fop = NULL; } else } else { BUG(); } else pde_put(de); } return inode; }