diff options
| -rw-r--r-- | fs/proc/base.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/proc/base.c b/fs/proc/base.c index de22c2002b38..6f927340db0a 100644 --- a/fs/proc/base.c +++ b/fs/proc/base.c | |||
| @@ -1891,19 +1891,19 @@ bool proc_fill_cache(struct file *file, struct dir_context *ctx, | |||
| 1891 | struct dentry *res; | 1891 | struct dentry *res; |
| 1892 | res = instantiate(child, task, ptr); | 1892 | res = instantiate(child, task, ptr); |
| 1893 | d_lookup_done(child); | 1893 | d_lookup_done(child); |
| 1894 | if (IS_ERR(res)) | ||
| 1895 | goto end_instantiate; | ||
| 1896 | if (unlikely(res)) { | 1894 | if (unlikely(res)) { |
| 1897 | dput(child); | 1895 | dput(child); |
| 1898 | child = res; | 1896 | child = res; |
| 1897 | if (IS_ERR(child)) | ||
| 1898 | goto end_instantiate; | ||
| 1899 | } | 1899 | } |
| 1900 | } | 1900 | } |
| 1901 | } | 1901 | } |
| 1902 | inode = d_inode(child); | 1902 | inode = d_inode(child); |
| 1903 | ino = inode->i_ino; | 1903 | ino = inode->i_ino; |
| 1904 | type = inode->i_mode >> 12; | 1904 | type = inode->i_mode >> 12; |
| 1905 | end_instantiate: | ||
| 1906 | dput(child); | 1905 | dput(child); |
| 1906 | end_instantiate: | ||
| 1907 | return dir_emit(ctx, name, len, ino, type); | 1907 | return dir_emit(ctx, name, len, ino, type); |
| 1908 | } | 1908 | } |
| 1909 | 1909 | ||
