diff options
Diffstat (limited to 'fs/stat.c')
-rw-r--r-- | fs/stat.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -57,13 +57,13 @@ EXPORT_SYMBOL(vfs_getattr); | |||
57 | 57 | ||
58 | int vfs_fstat(unsigned int fd, struct kstat *stat) | 58 | int vfs_fstat(unsigned int fd, struct kstat *stat) |
59 | { | 59 | { |
60 | int fput_needed; | 60 | struct fd f = fdget_raw(fd); |
61 | struct file *f = fget_raw_light(fd, &fput_needed); | ||
62 | int error = -EBADF; | 61 | int error = -EBADF; |
63 | 62 | ||
64 | if (f) { | 63 | if (f.file) { |
65 | error = vfs_getattr(f->f_path.mnt, f->f_path.dentry, stat); | 64 | error = vfs_getattr(f.file->f_path.mnt, f.file->f_path.dentry, |
66 | fput_light(f, fput_needed); | 65 | stat); |
66 | fdput(f); | ||
67 | } | 67 | } |
68 | return error; | 68 | return error; |
69 | } | 69 | } |