diff options
Diffstat (limited to 'fs')
-rw-r--r-- | fs/proc/root.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/proc/root.c b/fs/proc/root.c index 229e366598d..e0a790da726 100644 --- a/fs/proc/root.c +++ b/fs/proc/root.c @@ -205,7 +205,9 @@ static struct dentry *proc_root_lookup(struct inode * dir, struct dentry * dentr static int proc_root_readdir(struct file *file, struct dir_context *ctx) { if (ctx->pos < FIRST_PROCESS_ENTRY) { - proc_readdir(file, ctx); + int error = proc_readdir(file, ctx); + if (unlikely(error <= 0)) + return error; ctx->pos = FIRST_PROCESS_ENTRY; } |