aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ioctl.c
diff options
context:
space:
mode:
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);