Skip to content

Commit

Permalink
uapi: move forward declarations of internal structures
Browse files Browse the repository at this point in the history
Don't user forward declarations of internal kernel structures in headers
exported to userspace.

Move "struct completion;".
Move "struct task_struct;".

Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Alexey Dobriyan <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
Alexey Dobriyan authored and torvalds committed Aug 2, 2016
1 parent bd721ea commit db3f600
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 4 deletions.
1 change: 1 addition & 0 deletions include/linux/capability.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ struct cpu_vfs_cap_data {
struct file;
struct inode;
struct dentry;
struct task_struct;
struct user_namespace;

extern const kernel_cap_t __cap_empty_set;
Expand Down
1 change: 1 addition & 0 deletions include/linux/sysctl.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
#include <uapi/linux/sysctl.h>

/* For the /proc/sys support */
struct completion;
struct ctl_table;
struct nsproxy;
struct ctl_table_root;
Expand Down
2 changes: 0 additions & 2 deletions include/uapi/linux/capability.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@

#include <linux/types.h>

struct task_struct;

/* User-level do most of the mapping between kernel and user
capabilities based on the version tag given by the kernel. The
kernel might be somewhat backwards compatible, but don't bet on
Expand Down
2 changes: 0 additions & 2 deletions include/uapi/linux/sysctl.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@
#include <linux/types.h>
#include <linux/compiler.h>

struct completion;

#define CTL_MAXNAME 10 /* how many path components do we allow in a
call to sysctl? In other words, what is
the largest acceptable value for the nlen
Expand Down

0 comments on commit db3f600

Please sign in to comment.