andes_export_filldir_readdir.patch (2516B)
1 --- linux-6.10.6/fs/readdir.c 2 +++ ./readdir.c 3 @@ -180,7 +180,7 @@ 4 int result; 5 }; 6 7 -static bool fillonedir(struct dir_context *ctx, const char *name, int namlen, 8 +bool fillonedir(struct dir_context *ctx, const char *name, int namlen, 9 loff_t offset, u64 ino, unsigned int d_type) 10 { 11 struct readdir_callback *buf = 12 @@ -216,6 +216,7 @@ 13 buf->result = -EFAULT; 14 return false; 15 } 16 +EXPORT_SYMBOL(fillonedir); 17 18 SYSCALL_DEFINE3(old_readdir, unsigned int, fd, 19 struct old_linux_dirent __user *, dirent, unsigned int, count) 20 @@ -259,7 +260,7 @@ 21 int error; 22 }; 23 24 -static bool filldir(struct dir_context *ctx, const char *name, int namlen, 25 +bool filldir(struct dir_context *ctx, const char *name, int namlen, 26 loff_t offset, u64 ino, unsigned int d_type) 27 { 28 struct linux_dirent __user *dirent, *prev; 29 @@ -307,6 +308,7 @@ 30 buf->error = -EFAULT; 31 return false; 32 } 33 +EXPORT_SYMBOL(filldir); 34 35 SYSCALL_DEFINE3(getdents, unsigned int, fd, 36 struct linux_dirent __user *, dirent, unsigned int, count) 37 @@ -347,7 +349,7 @@ 38 int error; 39 }; 40 41 -static bool filldir64(struct dir_context *ctx, const char *name, int namlen, 42 +bool filldir64(struct dir_context *ctx, const char *name, int namlen, 43 loff_t offset, u64 ino, unsigned int d_type) 44 { 45 struct linux_dirent64 __user *dirent, *prev; 46 @@ -390,6 +392,7 @@ 47 buf->error = -EFAULT; 48 return false; 49 } 50 +EXPORT_SYMBOL(filldir64); 51 52 SYSCALL_DEFINE3(getdents64, unsigned int, fd, 53 struct linux_dirent64 __user *, dirent, unsigned int, count) 54 @@ -437,7 +440,7 @@ 55 int result; 56 }; 57 58 -static bool compat_fillonedir(struct dir_context *ctx, const char *name, 59 +bool compat_fillonedir(struct dir_context *ctx, const char *name, 60 int namlen, loff_t offset, u64 ino, 61 unsigned int d_type) 62 { 63 @@ -474,6 +477,7 @@ 64 buf->result = -EFAULT; 65 return false; 66 } 67 +EXPORT_SYMBOL(compat_fillonedir); 68 69 COMPAT_SYSCALL_DEFINE3(old_readdir, unsigned int, fd, 70 struct compat_old_linux_dirent __user *, dirent, unsigned int, count) 71 @@ -511,7 +515,7 @@ 72 int error; 73 }; 74 75 -static bool compat_filldir(struct dir_context *ctx, const char *name, int namlen, 76 +bool compat_filldir(struct dir_context *ctx, const char *name, int namlen, 77 loff_t offset, u64 ino, unsigned int d_type) 78 { 79 struct compat_linux_dirent __user *dirent, *prev; 80 @@ -558,6 +562,7 @@ 81 buf->error = -EFAULT; 82 return false; 83 } 84 +EXPORT_SYMBOL(compat_filldir); 85 86 COMPAT_SYSCALL_DEFINE3(getdents, unsigned int, fd, 87 struct compat_linux_dirent __user *, dirent, unsigned int, count)