X-Git-Url: http://pileus.org/git/?a=blobdiff_plain;f=fs%2Fopen.c;h=1540632d8387fe98a51d0193201346acb18ae70e;hb=ceee0e95b67401ea34118a54369496ecdfb9a199;hp=d6c79a0dffc7b0827b09562e11fa0f610af5657d;hpb=912afc3616b94c5c4af584972c7f5903b53cf15a;p=~andy%2Flinux diff --git a/fs/open.c b/fs/open.c index d6c79a0dffc..1540632d838 100644 --- a/fs/open.c +++ b/fs/open.c @@ -397,10 +397,10 @@ SYSCALL_DEFINE1(fchdir, unsigned int, fd) { struct file *file; struct inode *inode; - int error; + int error, fput_needed; error = -EBADF; - file = fget(fd); + file = fget_raw_light(fd, &fput_needed); if (!file) goto out; @@ -414,7 +414,7 @@ SYSCALL_DEFINE1(fchdir, unsigned int, fd) if (!error) set_fs_pwd(current->fs, &file->f_path); out_putf: - fput(file); + fput_light(file, fput_needed); out: return error; }