diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2013-05-16 12:07:31 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2013-06-29 12:56:32 +0400 |
commit | f0c3b5093addc8bfe9fe3a5b01acb7ec7969eafa (patch) | |
tree | 3bad119186fd14fa95886cfc73c6953a4dd00e74 /fs/proc/root.c | |
parent | 68c61471138402e34489edc5efde4f0fc5beaa25 (diff) | |
download | linux-rpi-f0c3b5093addc8bfe9fe3a5b01acb7ec7969eafa.tar.gz linux-rpi-f0c3b5093addc8bfe9fe3a5b01acb7ec7969eafa.tar.bz2 linux-rpi-f0c3b5093addc8bfe9fe3a5b01acb7ec7969eafa.zip |
[readdir] convert procfs
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/proc/root.c')
-rw-r--r-- | fs/proc/root.c | 19 |
1 files changed, 6 insertions, 13 deletions
diff --git a/fs/proc/root.c b/fs/proc/root.c index 41a6ea93f486..229e366598da 100644 --- a/fs/proc/root.c +++ b/fs/proc/root.c @@ -202,21 +202,14 @@ static struct dentry *proc_root_lookup(struct inode * dir, struct dentry * dentr return proc_pid_lookup(dir, dentry, flags); } -static int proc_root_readdir(struct file * filp, - void * dirent, filldir_t filldir) +static int proc_root_readdir(struct file *file, struct dir_context *ctx) { - unsigned int nr = filp->f_pos; - int ret; - - if (nr < FIRST_PROCESS_ENTRY) { - int error = proc_readdir(filp, dirent, filldir); - if (error <= 0) - return error; - filp->f_pos = FIRST_PROCESS_ENTRY; + if (ctx->pos < FIRST_PROCESS_ENTRY) { + proc_readdir(file, ctx); + ctx->pos = FIRST_PROCESS_ENTRY; } - ret = proc_pid_readdir(filp, dirent, filldir); - return ret; + return proc_pid_readdir(file, ctx); } /* @@ -226,7 +219,7 @@ static int proc_root_readdir(struct file * filp, */ static const struct file_operations proc_root_operations = { .read = generic_read_dir, - .readdir = proc_root_readdir, + .iterate = proc_root_readdir, .llseek = default_llseek, }; |