From 4cc4bcb74ced71aaa9aff1907647f9ea54e52d15 Mon Sep 17 00:00:00 2001 From: Alexey Dobriyan Date: Thu, 31 May 2012 16:26:18 -0700 Subject: [PATCH] --- yaml --- r: 309738 b: refs/heads/master c: f05ed3f1abefd37c08fbf08c766d2abd40607777 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/fs/proc/base.c | 13 +++++++------ 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/[refs] b/[refs] index 7ffed442dfe2..272248f21ec1 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 2344bec788b097b2d1198758bd29c583812b864e +refs/heads/master: f05ed3f1abefd37c08fbf08c766d2abd40607777 diff --git a/trunk/fs/proc/base.c b/trunk/fs/proc/base.c index 155dee600ed4..0f928cbba4a4 100644 --- a/trunk/fs/proc/base.c +++ b/trunk/fs/proc/base.c @@ -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: