|
@@ -847,10 +847,12 @@ struct compat_readdir_callback {
|
|
int result;
|
|
int result;
|
|
};
|
|
};
|
|
|
|
|
|
-static int compat_fillonedir(void *__buf, const char *name, int namlen,
|
|
|
|
- loff_t offset, u64 ino, unsigned int d_type)
|
|
|
|
|
|
+static int compat_fillonedir(struct dir_context *ctx, const char *name,
|
|
|
|
+ int namlen, loff_t offset, u64 ino,
|
|
|
|
+ unsigned int d_type)
|
|
{
|
|
{
|
|
- struct compat_readdir_callback *buf = __buf;
|
|
|
|
|
|
+ struct compat_readdir_callback *buf =
|
|
|
|
+ container_of(ctx, struct compat_readdir_callback, ctx);
|
|
struct compat_old_linux_dirent __user *dirent;
|
|
struct compat_old_linux_dirent __user *dirent;
|
|
compat_ulong_t d_ino;
|
|
compat_ulong_t d_ino;
|
|
|
|
|
|
@@ -915,11 +917,12 @@ struct compat_getdents_callback {
|
|
int error;
|
|
int error;
|
|
};
|
|
};
|
|
|
|
|
|
-static int compat_filldir(void *__buf, const char *name, int namlen,
|
|
|
|
|
|
+static int compat_filldir(struct dir_context *ctx, const char *name, int namlen,
|
|
loff_t offset, u64 ino, unsigned int d_type)
|
|
loff_t offset, u64 ino, unsigned int d_type)
|
|
{
|
|
{
|
|
struct compat_linux_dirent __user * dirent;
|
|
struct compat_linux_dirent __user * dirent;
|
|
- struct compat_getdents_callback *buf = __buf;
|
|
|
|
|
|
+ struct compat_getdents_callback *buf =
|
|
|
|
+ container_of(ctx, struct compat_getdents_callback, ctx);
|
|
compat_ulong_t d_ino;
|
|
compat_ulong_t d_ino;
|
|
int reclen = ALIGN(offsetof(struct compat_linux_dirent, d_name) +
|
|
int reclen = ALIGN(offsetof(struct compat_linux_dirent, d_name) +
|
|
namlen + 2, sizeof(compat_long_t));
|
|
namlen + 2, sizeof(compat_long_t));
|
|
@@ -1001,11 +1004,13 @@ struct compat_getdents_callback64 {
|
|
int error;
|
|
int error;
|
|
};
|
|
};
|
|
|
|
|
|
-static int compat_filldir64(void * __buf, const char * name, int namlen, loff_t offset,
|
|
|
|
- u64 ino, unsigned int d_type)
|
|
|
|
|
|
+static int compat_filldir64(struct dir_context *ctx, const char *name,
|
|
|
|
+ int namlen, loff_t offset, u64 ino,
|
|
|
|
+ unsigned int d_type)
|
|
{
|
|
{
|
|
struct linux_dirent64 __user *dirent;
|
|
struct linux_dirent64 __user *dirent;
|
|
- struct compat_getdents_callback64 *buf = __buf;
|
|
|
|
|
|
+ struct compat_getdents_callback64 *buf =
|
|
|
|
+ container_of(ctx, struct compat_getdents_callback64, ctx);
|
|
int reclen = ALIGN(offsetof(struct linux_dirent64, d_name) + namlen + 1,
|
|
int reclen = ALIGN(offsetof(struct linux_dirent64, d_name) + namlen + 1,
|
|
sizeof(u64));
|
|
sizeof(u64));
|
|
u64 off;
|
|
u64 off;
|