Commit a7a005fd authored by Josef Sipek's avatar Josef Sipek Committed by Linus Torvalds
Browse files

[PATCH] struct path: convert kernel


Signed-off-by: default avatarJosef Sipek <jsipek@fsl.cs.sunysb.edu>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent ff273773
...@@ -781,8 +781,8 @@ static void audit_log_task_info(struct audit_buffer *ab, struct task_struct *tsk ...@@ -781,8 +781,8 @@ static void audit_log_task_info(struct audit_buffer *ab, struct task_struct *tsk
if ((vma->vm_flags & VM_EXECUTABLE) && if ((vma->vm_flags & VM_EXECUTABLE) &&
vma->vm_file) { vma->vm_file) {
audit_log_d_path(ab, "exe=", audit_log_d_path(ab, "exe=",
vma->vm_file->f_dentry, vma->vm_file->f_path.dentry,
vma->vm_file->f_vfsmnt); vma->vm_file->f_path.mnt);
break; break;
} }
vma = vma->vm_next; vma = vma->vm_next;
......
...@@ -413,8 +413,8 @@ static struct file_system_type cpuset_fs_type = { ...@@ -413,8 +413,8 @@ static struct file_system_type cpuset_fs_type = {
* *
* *
* When reading/writing to a file: * When reading/writing to a file:
* - the cpuset to use in file->f_dentry->d_parent->d_fsdata * - the cpuset to use in file->f_path.dentry->d_parent->d_fsdata
* - the 'cftype' of the file is file->f_dentry->d_fsdata * - the 'cftype' of the file is file->f_path.dentry->d_fsdata
*/ */
struct cftype { struct cftype {
...@@ -1284,8 +1284,8 @@ static ssize_t cpuset_common_file_write(struct file *file, ...@@ -1284,8 +1284,8 @@ static ssize_t cpuset_common_file_write(struct file *file,
const char __user *userbuf, const char __user *userbuf,
size_t nbytes, loff_t *unused_ppos) size_t nbytes, loff_t *unused_ppos)
{ {
struct cpuset *cs = __d_cs(file->f_dentry->d_parent); struct cpuset *cs = __d_cs(file->f_path.dentry->d_parent);
struct cftype *cft = __d_cft(file->f_dentry); struct cftype *cft = __d_cft(file->f_path.dentry);
cpuset_filetype_t type = cft->private; cpuset_filetype_t type = cft->private;
char *buffer; char *buffer;
char *pathbuf = NULL; char *pathbuf = NULL;
...@@ -1367,7 +1367,7 @@ static ssize_t cpuset_file_write(struct file *file, const char __user *buf, ...@@ -1367,7 +1367,7 @@ static ssize_t cpuset_file_write(struct file *file, const char __user *buf,
size_t nbytes, loff_t *ppos) size_t nbytes, loff_t *ppos)
{ {
ssize_t retval = 0; ssize_t retval = 0;
struct cftype *cft = __d_cft(file->f_dentry); struct cftype *cft = __d_cft(file->f_path.dentry);
if (!cft) if (!cft)
return -ENODEV; return -ENODEV;
...@@ -1417,8 +1417,8 @@ static int cpuset_sprintf_memlist(char *page, struct cpuset *cs) ...@@ -1417,8 +1417,8 @@ static int cpuset_sprintf_memlist(char *page, struct cpuset *cs)
static ssize_t cpuset_common_file_read(struct file *file, char __user *buf, static ssize_t cpuset_common_file_read(struct file *file, char __user *buf,
size_t nbytes, loff_t *ppos) size_t nbytes, loff_t *ppos)
{ {
struct cftype *cft = __d_cft(file->f_dentry); struct cftype *cft = __d_cft(file->f_path.dentry);
struct cpuset *cs = __d_cs(file->f_dentry->d_parent); struct cpuset *cs = __d_cs(file->f_path.dentry->d_parent);
cpuset_filetype_t type = cft->private; cpuset_filetype_t type = cft->private;
char *page; char *page;
ssize_t retval = 0; ssize_t retval = 0;
...@@ -1476,7 +1476,7 @@ static ssize_t cpuset_file_read(struct file *file, char __user *buf, size_t nbyt ...@@ -1476,7 +1476,7 @@ static ssize_t cpuset_file_read(struct file *file, char __user *buf, size_t nbyt
loff_t *ppos) loff_t *ppos)
{ {
ssize_t retval = 0; ssize_t retval = 0;
struct cftype *cft = __d_cft(file->f_dentry); struct cftype *cft = __d_cft(file->f_path.dentry);
if (!cft) if (!cft)
return -ENODEV; return -ENODEV;
...@@ -1498,7 +1498,7 @@ static int cpuset_file_open(struct inode *inode, struct file *file) ...@@ -1498,7 +1498,7 @@ static int cpuset_file_open(struct inode *inode, struct file *file)
if (err) if (err)
return err; return err;
cft = __d_cft(file->f_dentry); cft = __d_cft(file->f_path.dentry);
if (!cft) if (!cft)
return -ENODEV; return -ENODEV;
if (cft->open) if (cft->open)
...@@ -1511,7 +1511,7 @@ static int cpuset_file_open(struct inode *inode, struct file *file) ...@@ -1511,7 +1511,7 @@ static int cpuset_file_open(struct inode *inode, struct file *file)
static int cpuset_file_release(struct inode *inode, struct file *file) static int cpuset_file_release(struct inode *inode, struct file *file)
{ {
struct cftype *cft = __d_cft(file->f_dentry); struct cftype *cft = __d_cft(file->f_path.dentry);
if (cft->release) if (cft->release)
return cft->release(inode, file); return cft->release(inode, file);
return 0; return 0;
...@@ -1700,7 +1700,7 @@ static int pid_array_to_buf(char *buf, int sz, pid_t *a, int npids) ...@@ -1700,7 +1700,7 @@ static int pid_array_to_buf(char *buf, int sz, pid_t *a, int npids)
*/ */
static int cpuset_tasks_open(struct inode *unused, struct file *file) static int cpuset_tasks_open(struct inode *unused, struct file *file)
{ {
struct cpuset *cs = __d_cs(file->f_dentry->d_parent); struct cpuset *cs = __d_cs(file->f_path.dentry->d_parent);
struct ctr_struct *ctr; struct ctr_struct *ctr;
pid_t *pidarray; pid_t *pidarray;
int npids; int npids;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment