You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
apfs: fix reading of large directories
A single call to apfs_readdir() is not necessarily enough to list a whole directory; ctx->pos tries to keep track of the last dentry found, so that the next call can continue from the same spot. Now that the module can create large numbers of files, it has become obvious that this doesn't work: many files are missing from the ls output for big directories. The bug is very simple: ctx->pos is being incremented twice for each new record. Remove one of the increments. Signed-off-by: Ernesto A. Fernández <ernesto.mnd.fernandez@gmail.com>
This commit is contained in:
@@ -218,7 +218,6 @@ static int apfs_readdir(struct file *file, struct dir_context *ctx)
|
||||
if (!dir_emit(ctx, drec.name, drec.name_len,
|
||||
drec.ino, drec.type))
|
||||
break;
|
||||
ctx->pos++;
|
||||
}
|
||||
pos--;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user