summaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
Diffstat (limited to 'fs')
-rw-r--r--fs/fs.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/fs/fs.c b/fs/fs.c
index 95813b6089..24a3319544 100644
--- a/fs/fs.c
+++ b/fs/fs.c
@@ -890,6 +890,21 @@ static int fillonedir(struct dir_context *ctx, const char *name, int namlen,
return 0;
}
+int unreaddir(DIR *dir, const struct dirent *d)
+{
+ struct readdir_entry *entry;
+
+ if (d != &dir->d)
+ return -EINVAL;
+
+ entry = xzalloc(sizeof(*entry));
+ entry->d = *d;
+ list_add_tail(&entry->list, &dir->entries);
+
+ return 0;
+}
+EXPORT_SYMBOL(unreaddir);
+
struct dirent *readdir(DIR *dir)
{
struct readdir_entry *entry;