author: Linus Torvalds <torvalds@linux-foundation.org> 2012-10-02 20:25:04 -0700
committer: Linus Torvalds <torvalds@linux-foundation.org> 2012-10-02 20:25:04 -0700
commit: aab174f0df5d72d31caccf281af5f614fa254578
parent: ca41cc96b2813221b05af57d0355157924de5a07
Commit Summary:
Diffstat:
1 file changed, 5 insertions, 5 deletions
diff --git a/fs/stat.c b/fs/stat.c
index 208039eec6c7..eae494630a36 100644
--- a/fs/stat.c
+++ b/fs/stat.c
@@ -57,13 +57,13 @@ EXPORT_SYMBOL(vfs_getattr);
int vfs_fstat(unsigned int fd, struct kstat *stat)
{
- int fput_needed;
- struct file *f = fget_raw_light(fd, &fput_needed);
+ struct fd f = fdget_raw(fd);
int error = -EBADF;
- if (f) {
- error = vfs_getattr(f->f_path.mnt, f->f_path.dentry, stat);
- fput_light(f, fput_needed);
+ if (f.file) {
+ error = vfs_getattr(f.file->f_path.mnt, f.file->f_path.dentry,
+ stat);
+ fdput(f);
}
return error;
}