|
@@ -1928,21 +1928,22 @@ static int proc_readfd_common(struct file * filp, void * dirent,
|
|
|
fd++, filp->f_pos++) {
|
|
|
char name[PROC_NUMBUF];
|
|
|
int len;
|
|
|
+ int rv;
|
|
|
|
|
|
if (!fcheck_files(files, fd))
|
|
|
continue;
|
|
|
rcu_read_unlock();
|
|
|
|
|
|
len = snprintf(name, sizeof(name), "%d", fd);
|
|
|
- if (proc_fill_cache(filp, dirent, filldir,
|
|
|
- name, len, instantiate,
|
|
|
- p, &fd) < 0) {
|
|
|
- rcu_read_lock();
|
|
|
- break;
|
|
|
- }
|
|
|
+ rv = proc_fill_cache(filp, dirent, filldir,
|
|
|
+ name, len, instantiate, p,
|
|
|
+ &fd);
|
|
|
+ if (rv < 0)
|
|
|
+ goto out_fd_loop;
|
|
|
rcu_read_lock();
|
|
|
}
|
|
|
rcu_read_unlock();
|
|
|
+out_fd_loop:
|
|
|
put_files_struct(files);
|
|
|
}
|
|
|
out:
|