diff options
| -rw-r--r-- | fs/open.c | 6 |
1 files changed, 3 insertions, 3 deletions
| @@ -397,10 +397,10 @@ SYSCALL_DEFINE1(fchdir, unsigned int, fd) | |||
| 397 | { | 397 | { |
| 398 | struct file *file; | 398 | struct file *file; |
| 399 | struct inode *inode; | 399 | struct inode *inode; |
| 400 | int error; | 400 | int error, fput_needed; |
| 401 | 401 | ||
| 402 | error = -EBADF; | 402 | error = -EBADF; |
| 403 | file = fget(fd); | 403 | file = fget_raw_light(fd, &fput_needed); |
| 404 | if (!file) | 404 | if (!file) |
| 405 | goto out; | 405 | goto out; |
| 406 | 406 | ||
| @@ -414,7 +414,7 @@ SYSCALL_DEFINE1(fchdir, unsigned int, fd) | |||
| 414 | if (!error) | 414 | if (!error) |
| 415 | set_fs_pwd(current->fs, &file->f_path); | 415 | set_fs_pwd(current->fs, &file->f_path); |
| 416 | out_putf: | 416 | out_putf: |
| 417 | fput(file); | 417 | fput_light(file, fput_needed); |
| 418 | out: | 418 | out: |
| 419 | return error; | 419 | return error; |
| 420 | } | 420 | } |
