aboutsummaryrefslogtreecommitdiffstats
path: root/fs/statfs.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/statfs.c')
-rw-r--r--fs/statfs.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/statfs.c b/fs/statfs.c
index 43e6b6fe4e85..95ad5c0e586c 100644
--- a/fs/statfs.c
+++ b/fs/statfs.c
@@ -87,11 +87,12 @@ int user_statfs(const char __user *pathname, struct kstatfs *st)
87 87
88int fd_statfs(int fd, struct kstatfs *st) 88int fd_statfs(int fd, struct kstatfs *st)
89{ 89{
90 struct file *file = fget(fd); 90 int fput_needed;
91 struct file *file = fget_light(fd, &fput_needed);
91 int error = -EBADF; 92 int error = -EBADF;
92 if (file) { 93 if (file) {
93 error = vfs_statfs(&file->f_path, st); 94 error = vfs_statfs(&file->f_path, st);
94 fput(file); 95 fput_light(file, fput_needed);
95 } 96 }
96 return error; 97 return error;
97} 98}