It's enough to use llseek to set lower dir pos. No need to also set
lower_file->f_pos directly, as it breaks readdir for ext4 and other
ext-based file systems. Reported by Vaibhav Nagarnaik and Ted Ts'o.
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
goto out;
}
- lower_file->f_pos = ctx->pos;
err = iterate_dir(lower_file, &buf.ctx);
- ctx->pos = buf.ctx.pos;
+ ctx->pos = buf.ctx.pos; /* XXX: not sure if needed (cf. ecryptfs) */
/* Save the position for when we continue. */
offset = vfs_llseek(lower_file, 0, SEEK_CUR);