aboutsummaryrefslogtreecommitdiffstats
path: root/fs/open.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/open.c')
-rw-r--r--fs/open.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/open.c b/fs/open.c
index d6c79a0dffc7..1540632d8387 100644
--- a/fs/open.c
+++ b/fs/open.c
@@ -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);
416out_putf: 416out_putf:
417 fput(file); 417 fput_light(file, fput_needed);
418out: 418out:
419 return error; 419 return error;
420} 420}