mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
[readdir] ->readdir() is gone
everything's converted to ->iterate() Signed-off-by: Al Viro <[email protected]>
This commit is contained in:
parent
2de5f059c4
commit
2233f31aad
7 changed files with 13 additions and 16 deletions
13
fs/readdir.c
13
fs/readdir.c
|
|
@ -24,7 +24,7 @@ int iterate_dir(struct file *file, struct dir_context *ctx)
|
|||
{
|
||||
struct inode *inode = file_inode(file);
|
||||
int res = -ENOTDIR;
|
||||
if (!file->f_op || (!file->f_op->readdir && !file->f_op->iterate))
|
||||
if (!file->f_op || !file->f_op->iterate)
|
||||
goto out;
|
||||
|
||||
res = security_file_permission(file, MAY_READ);
|
||||
|
|
@ -37,14 +37,9 @@ int iterate_dir(struct file *file, struct dir_context *ctx)
|
|||
|
||||
res = -ENOENT;
|
||||
if (!IS_DEADDIR(inode)) {
|
||||
if (file->f_op->iterate) {
|
||||
ctx->pos = file->f_pos;
|
||||
res = file->f_op->iterate(file, ctx);
|
||||
file->f_pos = ctx->pos;
|
||||
} else {
|
||||
res = file->f_op->readdir(file, ctx, ctx->actor);
|
||||
ctx->pos = file->f_pos;
|
||||
}
|
||||
ctx->pos = file->f_pos;
|
||||
res = file->f_op->iterate(file, ctx);
|
||||
file->f_pos = ctx->pos;
|
||||
file_accessed(file);
|
||||
}
|
||||
mutex_unlock(&inode->i_mutex);
|
||||
|
|
|
|||
Loading…
Reference in a new issue