aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ioctl.c
diff options
context:
space:
mode:
authorJosef "Jeff" Sipek <jsipek@cs.sunysb.edu>2006-12-08 05:36:35 -0500
committerLinus Torvalds <torvalds@woody.osdl.org>2006-12-08 11:28:41 -0500
commit0f7fc9e4d03987fe29f6dd4aa67e4c56eb7ecb05 (patch)
tree51763269e44eb9bf4d0f8c529577489902850cf9 /fs/ioctl.c
parentb65d34fd465f19fbe2f32f2205a9a06ca7c2bdeb (diff)
[PATCH] VFS: change struct file to use struct path
This patch changes struct file to use struct path instead of having independent pointers to struct dentry and struct vfsmount, and converts all users of f_{dentry,vfsmnt} in fs/ to use f_path.{dentry,mnt}. Additionally, it adds two #define's to make the transition easier for users of the f_dentry and f_vfsmnt. Signed-off-by: Josef "Jeff" Sipek <jsipek@cs.sunysb.edu> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs/ioctl.c')
-rw-r--r--fs/ioctl.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/fs/ioctl.c b/fs/ioctl.c
index 4b7660b09ac0..ff61772ceedd 100644
--- a/fs/ioctl.c
+++ b/fs/ioctl.c
@@ -31,7 +31,7 @@ static long do_ioctl(struct file *filp, unsigned int cmd,
31 goto out; 31 goto out;
32 } else if (filp->f_op->ioctl) { 32 } else if (filp->f_op->ioctl) {
33 lock_kernel(); 33 lock_kernel();
34 error = filp->f_op->ioctl(filp->f_dentry->d_inode, 34 error = filp->f_op->ioctl(filp->f_path.dentry->d_inode,
35 filp, cmd, arg); 35 filp, cmd, arg);
36 unlock_kernel(); 36 unlock_kernel();
37 } 37 }
@@ -45,7 +45,7 @@ static int file_ioctl(struct file *filp, unsigned int cmd,
45{ 45{
46 int error; 46 int error;
47 int block; 47 int block;
48 struct inode * inode = filp->f_dentry->d_inode; 48 struct inode * inode = filp->f_path.dentry->d_inode;
49 int __user *p = (int __user *)arg; 49 int __user *p = (int __user *)arg;
50 50
51 switch (cmd) { 51 switch (cmd) {
@@ -137,17 +137,17 @@ int vfs_ioctl(struct file *filp, unsigned int fd, unsigned int cmd, unsigned lon
137 break; 137 break;
138 138
139 case FIOQSIZE: 139 case FIOQSIZE:
140 if (S_ISDIR(filp->f_dentry->d_inode->i_mode) || 140 if (S_ISDIR(filp->f_path.dentry->d_inode->i_mode) ||
141 S_ISREG(filp->f_dentry->d_inode->i_mode) || 141 S_ISREG(filp->f_path.dentry->d_inode->i_mode) ||
142 S_ISLNK(filp->f_dentry->d_inode->i_mode)) { 142 S_ISLNK(filp->f_path.dentry->d_inode->i_mode)) {
143 loff_t res = inode_get_bytes(filp->f_dentry->d_inode); 143 loff_t res = inode_get_bytes(filp->f_path.dentry->d_inode);
144 error = copy_to_user((loff_t __user *)arg, &res, sizeof(res)) ? -EFAULT : 0; 144 error = copy_to_user((loff_t __user *)arg, &res, sizeof(res)) ? -EFAULT : 0;
145 } 145 }
146 else 146 else
147 error = -ENOTTY; 147 error = -ENOTTY;
148 break; 148 break;
149 default: 149 default:
150 if (S_ISREG(filp->f_dentry->d_inode->i_mode)) 150 if (S_ISREG(filp->f_path.dentry->d_inode->i_mode))
151 error = file_ioctl(filp, cmd, arg); 151 error = file_ioctl(filp, cmd, arg);
152 else 152 else
153 error = do_ioctl(filp, cmd, arg); 153 error = do_ioctl(filp, cmd, arg);