Check bsd_to_linux_statfs() return value. Forgotten in r297070.

MFC after:	1 week
This commit is contained in:
Dmitry Chagin 2016-03-20 19:06:21 +00:00
parent 525c9796c3
commit 2ad0231309
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=297072

View File

@ -429,7 +429,9 @@ linux_statfs(struct thread *td, struct linux_statfs_args *args)
LFREEPATH(path);
if (error)
return (error);
bsd_to_linux_statfs(&bsd_statfs, &linux_statfs);
error = bsd_to_linux_statfs(&bsd_statfs, &linux_statfs);
if (error)
return (error);
return (copyout(&linux_statfs, args->buf, sizeof(linux_statfs)));
}
@ -510,8 +512,10 @@ linux_fstatfs(struct thread *td, struct linux_fstatfs_args *args)
#endif
error = kern_fstatfs(td, args->fd, &bsd_statfs);
if (error)
return error;
bsd_to_linux_statfs(&bsd_statfs, &linux_statfs);
return (error);
error = bsd_to_linux_statfs(&bsd_statfs, &linux_statfs);
if (error)
return (error);
return (copyout(&linux_statfs, args->buf, sizeof(linux_statfs)));
}