aboutsummaryrefslogtreecommitdiffstats
path: root/fs/readdir.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/readdir.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/readdir.c')
-rw-r--r--fs/readdir.c21
1 files changed, 12 insertions, 9 deletions
diff --git a/fs/readdir.c b/fs/readdir.c
index 33fd92208cb7..ced679179cac 100644
--- a/fs/readdir.c
+++ b/fs/readdir.c
@@ -74,10 +74,11 @@ struct readdir_callback {
74 int result; 74 int result;
75}; 75};
76 76
77static int fillonedir(void * __buf, const char * name, int namlen, loff_t offset, 77static int fillonedir(struct dir_context *ctx, const char *name, int namlen,
78 u64 ino, unsigned int d_type) 78 loff_t offset, u64 ino, unsigned int d_type)
79{ 79{
80 struct readdir_callback *buf = (struct readdir_callback *) __buf; 80 struct readdir_callback *buf =
81 container_of(ctx, struct readdir_callback, ctx);
81 struct old_linux_dirent __user * dirent; 82 struct old_linux_dirent __user * dirent;
82 unsigned long d_ino; 83 unsigned long d_ino;
83 84
@@ -148,11 +149,12 @@ struct getdents_callback {
148 int error; 149 int error;
149}; 150};
150 151
151static int filldir(void * __buf, const char * name, int namlen, loff_t offset, 152static int filldir(struct dir_context *ctx, const char *name, int namlen,
152 u64 ino, unsigned int d_type) 153 loff_t offset, u64 ino, unsigned int d_type)
153{ 154{
154 struct linux_dirent __user * dirent; 155 struct linux_dirent __user * dirent;
155 struct getdents_callback * buf = (struct getdents_callback *) __buf; 156 struct getdents_callback *buf =
157 container_of(ctx, struct getdents_callback, ctx);
156 unsigned long d_ino; 158 unsigned long d_ino;
157 int reclen = ALIGN(offsetof(struct linux_dirent, d_name) + namlen + 2, 159 int reclen = ALIGN(offsetof(struct linux_dirent, d_name) + namlen + 2,
158 sizeof(long)); 160 sizeof(long));
@@ -232,11 +234,12 @@ struct getdents_callback64 {
232 int error; 234 int error;
233}; 235};
234 236
235static int filldir64(void * __buf, const char * name, int namlen, loff_t offset, 237static int filldir64(struct dir_context *ctx, const char *name, int namlen,
236 u64 ino, unsigned int d_type) 238 loff_t offset, u64 ino, unsigned int d_type)
237{ 239{
238 struct linux_dirent64 __user *dirent; 240 struct linux_dirent64 __user *dirent;
239 struct getdents_callback64 * buf = (struct getdents_callback64 *) __buf; 241 struct getdents_callback64 *buf =
242 container_of(ctx, struct getdents_callback64, ctx);
240 int reclen = ALIGN(offsetof(struct linux_dirent64, d_name) + namlen + 1, 243 int reclen = ALIGN(offsetof(struct linux_dirent64, d_name) + namlen + 1,
241 sizeof(u64)); 244 sizeof(u64));
242 245