aboutsummaryrefslogtreecommitdiffstats
path: root/fs/compat.c
diff options
context:
space:
mode:
authorMiklos Szeredi <miklos@szeredi.hu>2014-10-30 12:37:34 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2014-10-31 17:48:54 -0400
commitac7576f4b1da8c9c6bc1ae026c2b9e86ae617ba5 (patch)
treed1bc42645ba37d31ce4cd2208f8e4ab14d47467c /fs/compat.c
parent9f2f7d4c8dfcf4617af5de6ea381b91deac3db48 (diff)
vfs: make first argument of dir_context.actor typed
Signed-off-by: Miklos Szeredi <mszeredi@suse.cz> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/compat.c')
-rw-r--r--fs/compat.c21
1 files changed, 13 insertions, 8 deletions
diff --git a/fs/compat.c b/fs/compat.c
index b13df99f3534..6fd272d455e4 100644
--- a/fs/compat.c
+++ b/fs/compat.c
@@ -847,10 +847,12 @@ struct compat_readdir_callback {
847 int result; 847 int result;
848}; 848};
849 849
850static int compat_fillonedir(void *__buf, const char *name, int namlen, 850static int compat_fillonedir(struct dir_context *ctx, const char *name,
851 loff_t offset, u64 ino, unsigned int d_type) 851 int namlen, loff_t offset, u64 ino,
852 unsigned int d_type)
852{ 853{
853 struct compat_readdir_callback *buf = __buf; 854 struct compat_readdir_callback *buf =
855 container_of(ctx, struct compat_readdir_callback, ctx);
854 struct compat_old_linux_dirent __user *dirent; 856 struct compat_old_linux_dirent __user *dirent;
855 compat_ulong_t d_ino; 857 compat_ulong_t d_ino;
856 858
@@ -915,11 +917,12 @@ struct compat_getdents_callback {
915 int error; 917 int error;
916}; 918};
917 919
918static int compat_filldir(void *__buf, const char *name, int namlen, 920static int compat_filldir(struct dir_context *ctx, const char *name, int namlen,
919 loff_t offset, u64 ino, unsigned int d_type) 921 loff_t offset, u64 ino, unsigned int d_type)
920{ 922{
921 struct compat_linux_dirent __user * dirent; 923 struct compat_linux_dirent __user * dirent;
922 struct compat_getdents_callback *buf = __buf; 924 struct compat_getdents_callback *buf =
925 container_of(ctx, struct compat_getdents_callback, ctx);
923 compat_ulong_t d_ino; 926 compat_ulong_t d_ino;
924 int reclen = ALIGN(offsetof(struct compat_linux_dirent, d_name) + 927 int reclen = ALIGN(offsetof(struct compat_linux_dirent, d_name) +
925 namlen + 2, sizeof(compat_long_t)); 928 namlen + 2, sizeof(compat_long_t));
@@ -1001,11 +1004,13 @@ struct compat_getdents_callback64 {
1001 int error; 1004 int error;
1002}; 1005};
1003 1006
1004static int compat_filldir64(void * __buf, const char * name, int namlen, loff_t offset, 1007static int compat_filldir64(struct dir_context *ctx, const char *name,
1005 u64 ino, unsigned int d_type) 1008 int namlen, loff_t offset, u64 ino,
1009 unsigned int d_type)
1006{ 1010{
1007 struct linux_dirent64 __user *dirent; 1011 struct linux_dirent64 __user *dirent;
1008 struct compat_getdents_callback64 *buf = __buf; 1012 struct compat_getdents_callback64 *buf =
1013 container_of(ctx, struct compat_getdents_callback64, ctx);
1009 int reclen = ALIGN(offsetof(struct linux_dirent64, d_name) + namlen + 1, 1014 int reclen = ALIGN(offsetof(struct linux_dirent64, d_name) + namlen + 1,
1010 sizeof(u64)); 1015 sizeof(u64));
1011 u64 off; 1016 u64 off;