summaryrefslogtreecommitdiff
path: root/fs/statfs.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/statfs.c')
-rw-r--r--fs/statfs.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/statfs.c b/fs/statfs.c
index 96d1c3edf289..9c7bb27e7932 100644
--- a/fs/statfs.c
+++ b/fs/statfs.c
@@ -116,8 +116,8 @@ int fd_statfs(int fd, struct kstatfs *st)
{
struct fd f = fdget_raw(fd);
int error = -EBADF;
- if (f.file) {
- error = vfs_statfs(&f.file->f_path, st);
+ if (fd_file(f)) {
+ error = vfs_statfs(&fd_file(f)->f_path, st);
fdput(f);
}
return error;