diff options
author | Richard Weinberger <richard@nod.at> | 2015-03-24 15:47:38 +0100 |
---|---|---|
committer | Richard Weinberger <richard@nod.at> | 2015-04-13 21:01:07 +0200 |
commit | 0c9bd6365d0b278728359843b8303047ddedb831 (patch) | |
tree | 086abfcb95b657832d2e318ca5c3fa47822c8689 /fs/hostfs/hostfs_kern.c | |
parent | a98a6d864d3b84219a6ec6213b00c260fb52f9f4 (diff) | |
download | linux-0c9bd6365d0b278728359843b8303047ddedb831.tar.bz2 |
um: hostfs: Reduce number of syscalls in readdir
Currently hostfs issues every time a seekdir(), in fact
it has to do this only upon the first call.
Also telldir() can be omitted as we can obtain the directory
offset from readdir().
Signed-off-by: Richard Weinberger <richard@nod.at>
Diffstat (limited to 'fs/hostfs/hostfs_kern.c')
-rw-r--r-- | fs/hostfs/hostfs_kern.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/hostfs/hostfs_kern.c b/fs/hostfs/hostfs_kern.c index e77da44a235c..d0a2f68a0eea 100644 --- a/fs/hostfs/hostfs_kern.c +++ b/fs/hostfs/hostfs_kern.c @@ -292,6 +292,7 @@ static int hostfs_readdir(struct file *file, struct dir_context *ctx) if (dir == NULL) return -error; next = ctx->pos; + seek_dir(dir, next); while ((name = read_dir(dir, &next, &ino, &len, &type)) != NULL) { if (!dir_emit(ctx, name, len, ino, type)) break; |