mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
stop passing nameidata * to ->d_revalidate()
Just the lookup flags. Die, bastard, die... Signed-off-by: Al Viro <[email protected]>
This commit is contained in:
parent
fa3c56bbda
commit
0b728e1911
25 changed files with 74 additions and 84 deletions
|
|
@ -1601,13 +1601,13 @@ int pid_getattr(struct vfsmount *mnt, struct dentry *dentry, struct kstat *stat)
|
|||
* made this apply to all per process world readable and executable
|
||||
* directories.
|
||||
*/
|
||||
int pid_revalidate(struct dentry *dentry, struct nameidata *nd)
|
||||
int pid_revalidate(struct dentry *dentry, unsigned int flags)
|
||||
{
|
||||
struct inode *inode;
|
||||
struct task_struct *task;
|
||||
const struct cred *cred;
|
||||
|
||||
if (nd && nd->flags & LOOKUP_RCU)
|
||||
if (flags & LOOKUP_RCU)
|
||||
return -ECHILD;
|
||||
|
||||
inode = dentry->d_inode;
|
||||
|
|
@ -1781,7 +1781,7 @@ static int proc_fd_link(struct dentry *dentry, struct path *path)
|
|||
return proc_fd_info(dentry->d_inode, path, NULL);
|
||||
}
|
||||
|
||||
static int tid_fd_revalidate(struct dentry *dentry, struct nameidata *nd)
|
||||
static int tid_fd_revalidate(struct dentry *dentry, unsigned int flags)
|
||||
{
|
||||
struct inode *inode;
|
||||
struct task_struct *task;
|
||||
|
|
@ -1789,7 +1789,7 @@ static int tid_fd_revalidate(struct dentry *dentry, struct nameidata *nd)
|
|||
struct files_struct *files;
|
||||
const struct cred *cred;
|
||||
|
||||
if (nd && nd->flags & LOOKUP_RCU)
|
||||
if (flags & LOOKUP_RCU)
|
||||
return -ECHILD;
|
||||
|
||||
inode = dentry->d_inode;
|
||||
|
|
@ -1868,7 +1868,7 @@ static struct dentry *proc_fd_instantiate(struct inode *dir,
|
|||
d_set_d_op(dentry, &tid_fd_dentry_operations);
|
||||
d_add(dentry, inode);
|
||||
/* Close the race of the process dying before we return the dentry */
|
||||
if (tid_fd_revalidate(dentry, NULL))
|
||||
if (tid_fd_revalidate(dentry, 0))
|
||||
error = NULL;
|
||||
|
||||
out:
|
||||
|
|
@ -2003,7 +2003,7 @@ static int dname_to_vma_addr(struct dentry *dentry,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int map_files_d_revalidate(struct dentry *dentry, struct nameidata *nd)
|
||||
static int map_files_d_revalidate(struct dentry *dentry, unsigned int flags)
|
||||
{
|
||||
unsigned long vm_start, vm_end;
|
||||
bool exact_vma_exists = false;
|
||||
|
|
@ -2013,7 +2013,7 @@ static int map_files_d_revalidate(struct dentry *dentry, struct nameidata *nd)
|
|||
struct inode *inode;
|
||||
int status = 0;
|
||||
|
||||
if (nd && nd->flags & LOOKUP_RCU)
|
||||
if (flags & LOOKUP_RCU)
|
||||
return -ECHILD;
|
||||
|
||||
if (!capable(CAP_SYS_ADMIN)) {
|
||||
|
|
@ -2371,7 +2371,7 @@ static struct dentry *proc_fdinfo_instantiate(struct inode *dir,
|
|||
d_set_d_op(dentry, &tid_fd_dentry_operations);
|
||||
d_add(dentry, inode);
|
||||
/* Close the race of the process dying before we return the dentry */
|
||||
if (tid_fd_revalidate(dentry, NULL))
|
||||
if (tid_fd_revalidate(dentry, 0))
|
||||
error = NULL;
|
||||
|
||||
out:
|
||||
|
|
@ -2430,7 +2430,7 @@ static struct dentry *proc_pident_instantiate(struct inode *dir,
|
|||
d_set_d_op(dentry, &pid_dentry_operations);
|
||||
d_add(dentry, inode);
|
||||
/* Close the race of the process dying before we return the dentry */
|
||||
if (pid_revalidate(dentry, NULL))
|
||||
if (pid_revalidate(dentry, 0))
|
||||
error = NULL;
|
||||
out:
|
||||
return error;
|
||||
|
|
@ -3237,7 +3237,7 @@ static struct dentry *proc_pid_instantiate(struct inode *dir,
|
|||
|
||||
d_add(dentry, inode);
|
||||
/* Close the race of the process dying before we return the dentry */
|
||||
if (pid_revalidate(dentry, NULL))
|
||||
if (pid_revalidate(dentry, 0))
|
||||
error = NULL;
|
||||
out:
|
||||
return error;
|
||||
|
|
@ -3508,7 +3508,7 @@ static struct dentry *proc_task_instantiate(struct inode *dir,
|
|||
|
||||
d_add(dentry, inode);
|
||||
/* Close the race of the process dying before we return the dentry */
|
||||
if (pid_revalidate(dentry, NULL))
|
||||
if (pid_revalidate(dentry, 0))
|
||||
error = NULL;
|
||||
out:
|
||||
return error;
|
||||
|
|
|
|||
|
|
@ -142,7 +142,7 @@ typedef struct dentry *instantiate_t(struct inode *, struct dentry *,
|
|||
int proc_fill_cache(struct file *filp, void *dirent, filldir_t filldir,
|
||||
const char *name, int len,
|
||||
instantiate_t instantiate, struct task_struct *task, const void *ptr);
|
||||
int pid_revalidate(struct dentry *dentry, struct nameidata *nd);
|
||||
int pid_revalidate(struct dentry *dentry, unsigned int flags);
|
||||
struct inode *proc_pid_make_inode(struct super_block * sb, struct task_struct *task);
|
||||
extern const struct dentry_operations pid_dentry_operations;
|
||||
int pid_getattr(struct vfsmount *mnt, struct dentry *dentry, struct kstat *stat);
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ static struct dentry *proc_ns_instantiate(struct inode *dir,
|
|||
d_set_d_op(dentry, &pid_dentry_operations);
|
||||
d_add(dentry, inode);
|
||||
/* Close the race of the process dying before we return the dentry */
|
||||
if (pid_revalidate(dentry, NULL))
|
||||
if (pid_revalidate(dentry, 0))
|
||||
error = NULL;
|
||||
out:
|
||||
return error;
|
||||
|
|
|
|||
|
|
@ -794,9 +794,9 @@ static const struct inode_operations proc_sys_dir_operations = {
|
|||
.getattr = proc_sys_getattr,
|
||||
};
|
||||
|
||||
static int proc_sys_revalidate(struct dentry *dentry, struct nameidata *nd)
|
||||
static int proc_sys_revalidate(struct dentry *dentry, unsigned int flags)
|
||||
{
|
||||
if (nd->flags & LOOKUP_RCU)
|
||||
if (flags & LOOKUP_RCU)
|
||||
return -ECHILD;
|
||||
return !PROC_I(dentry->d_inode)->sysctl->unregistering;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue