diff options
Diffstat (limited to 'fs')
-rw-r--r-- | fs/proc/base.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/fs/proc/base.c b/fs/proc/base.c index 155dee600ed..0f928cbba4a 100644 --- a/fs/proc/base.c +++ b/fs/proc/base.c | |||
@@ -1928,21 +1928,22 @@ static int proc_readfd_common(struct file * filp, void * dirent, | |||
1928 | fd++, filp->f_pos++) { | 1928 | fd++, filp->f_pos++) { |
1929 | char name[PROC_NUMBUF]; | 1929 | char name[PROC_NUMBUF]; |
1930 | int len; | 1930 | int len; |
1931 | int rv; | ||
1931 | 1932 | ||
1932 | if (!fcheck_files(files, fd)) | 1933 | if (!fcheck_files(files, fd)) |
1933 | continue; | 1934 | continue; |
1934 | rcu_read_unlock(); | 1935 | rcu_read_unlock(); |
1935 | 1936 | ||
1936 | len = snprintf(name, sizeof(name), "%d", fd); | 1937 | len = snprintf(name, sizeof(name), "%d", fd); |
1937 | if (proc_fill_cache(filp, dirent, filldir, | 1938 | rv = proc_fill_cache(filp, dirent, filldir, |
1938 | name, len, instantiate, | 1939 | name, len, instantiate, p, |
1939 | p, &fd) < 0) { | 1940 | &fd); |
1940 | rcu_read_lock(); | 1941 | if (rv < 0) |
1941 | break; | 1942 | goto out_fd_loop; |
1942 | } | ||
1943 | rcu_read_lock(); | 1943 | rcu_read_lock(); |
1944 | } | 1944 | } |
1945 | rcu_read_unlock(); | 1945 | rcu_read_unlock(); |
1946 | out_fd_loop: | ||
1946 | put_files_struct(files); | 1947 | put_files_struct(files); |
1947 | } | 1948 | } |
1948 | out: | 1949 | out: |