diff options
Diffstat (limited to 'fs/compat.c')
-rw-r--r-- | fs/compat.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/fs/compat.c b/fs/compat.c index a7e3f162fb15..0ec70e3cee0a 100644 --- a/fs/compat.c +++ b/fs/compat.c | |||
@@ -232,7 +232,7 @@ asmlinkage long compat_sys_fstatfs(unsigned int fd, struct compat_statfs __user | |||
232 | file = fget(fd); | 232 | file = fget(fd); |
233 | if (!file) | 233 | if (!file) |
234 | goto out; | 234 | goto out; |
235 | error = vfs_statfs(file->f_dentry, &tmp); | 235 | error = vfs_statfs(file->f_path.dentry, &tmp); |
236 | if (!error) | 236 | if (!error) |
237 | error = put_compat_statfs(buf, &tmp); | 237 | error = put_compat_statfs(buf, &tmp); |
238 | fput(file); | 238 | fput(file); |
@@ -303,7 +303,7 @@ asmlinkage long compat_sys_fstatfs64(unsigned int fd, compat_size_t sz, struct c | |||
303 | file = fget(fd); | 303 | file = fget(fd); |
304 | if (!file) | 304 | if (!file) |
305 | goto out; | 305 | goto out; |
306 | error = vfs_statfs(file->f_dentry, &tmp); | 306 | error = vfs_statfs(file->f_path.dentry, &tmp); |
307 | if (!error) | 307 | if (!error) |
308 | error = put_compat_statfs64(buf, &tmp); | 308 | error = put_compat_statfs64(buf, &tmp); |
309 | fput(file); | 309 | fput(file); |
@@ -365,7 +365,7 @@ static void compat_ioctl_error(struct file *filp, unsigned int fd, | |||
365 | /* find the name of the device. */ | 365 | /* find the name of the device. */ |
366 | path = (char *)__get_free_page(GFP_KERNEL); | 366 | path = (char *)__get_free_page(GFP_KERNEL); |
367 | if (path) { | 367 | if (path) { |
368 | fn = d_path(filp->f_dentry, filp->f_vfsmnt, path, PAGE_SIZE); | 368 | fn = d_path(filp->f_path.dentry, filp->f_path.mnt, path, PAGE_SIZE); |
369 | if (IS_ERR(fn)) | 369 | if (IS_ERR(fn)) |
370 | fn = "?"; | 370 | fn = "?"; |
371 | } | 371 | } |
@@ -416,7 +416,7 @@ asmlinkage long compat_sys_ioctl(unsigned int fd, unsigned int cmd, | |||
416 | case FIBMAP: | 416 | case FIBMAP: |
417 | case FIGETBSZ: | 417 | case FIGETBSZ: |
418 | case FIONREAD: | 418 | case FIONREAD: |
419 | if (S_ISREG(filp->f_dentry->d_inode->i_mode)) | 419 | if (S_ISREG(filp->f_path.dentry->d_inode->i_mode)) |
420 | break; | 420 | break; |
421 | /*FALL THROUGH*/ | 421 | /*FALL THROUGH*/ |
422 | 422 | ||
@@ -438,7 +438,7 @@ asmlinkage long compat_sys_ioctl(unsigned int fd, unsigned int cmd, | |||
438 | goto found_handler; | 438 | goto found_handler; |
439 | } | 439 | } |
440 | 440 | ||
441 | if (S_ISSOCK(filp->f_dentry->d_inode->i_mode) && | 441 | if (S_ISSOCK(filp->f_path.dentry->d_inode->i_mode) && |
442 | cmd >= SIOCDEVPRIVATE && cmd <= (SIOCDEVPRIVATE + 15)) { | 442 | cmd >= SIOCDEVPRIVATE && cmd <= (SIOCDEVPRIVATE + 15)) { |
443 | error = siocdevprivate_ioctl(fd, cmd, arg); | 443 | error = siocdevprivate_ioctl(fd, cmd, arg); |
444 | } else { | 444 | } else { |
@@ -1259,7 +1259,7 @@ out: | |||
1259 | if (iov != iovstack) | 1259 | if (iov != iovstack) |
1260 | kfree(iov); | 1260 | kfree(iov); |
1261 | if ((ret + (type == READ)) > 0) { | 1261 | if ((ret + (type == READ)) > 0) { |
1262 | struct dentry *dentry = file->f_dentry; | 1262 | struct dentry *dentry = file->f_path.dentry; |
1263 | if (type == READ) | 1263 | if (type == READ) |
1264 | fsnotify_access(dentry); | 1264 | fsnotify_access(dentry); |
1265 | else | 1265 | else |
@@ -1679,19 +1679,19 @@ int compat_core_sys_select(int n, compat_ulong_t __user *inp, | |||
1679 | { | 1679 | { |
1680 | fd_set_bits fds; | 1680 | fd_set_bits fds; |
1681 | char *bits; | 1681 | char *bits; |
1682 | int size, max_fdset, ret = -EINVAL; | 1682 | int size, max_fds, ret = -EINVAL; |
1683 | struct fdtable *fdt; | 1683 | struct fdtable *fdt; |
1684 | 1684 | ||
1685 | if (n < 0) | 1685 | if (n < 0) |
1686 | goto out_nofds; | 1686 | goto out_nofds; |
1687 | 1687 | ||
1688 | /* max_fdset can increase, so grab it once to avoid race */ | 1688 | /* max_fds can increase, so grab it once to avoid race */ |
1689 | rcu_read_lock(); | 1689 | rcu_read_lock(); |
1690 | fdt = files_fdtable(current->files); | 1690 | fdt = files_fdtable(current->files); |
1691 | max_fdset = fdt->max_fdset; | 1691 | max_fds = fdt->max_fds; |
1692 | rcu_read_unlock(); | 1692 | rcu_read_unlock(); |
1693 | if (n > max_fdset) | 1693 | if (n > max_fds) |
1694 | n = max_fdset; | 1694 | n = max_fds; |
1695 | 1695 | ||
1696 | /* | 1696 | /* |
1697 | * We need 6 bitmaps (in/out/ex for both incoming and outgoing), | 1697 | * We need 6 bitmaps (in/out/ex for both incoming and outgoing), |