diff options
-rw-r--r-- | fs/proc/kcore.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/fs/proc/kcore.c b/fs/proc/kcore.c index 3d0485c361c7..56013371f9f3 100644 --- a/fs/proc/kcore.c +++ b/fs/proc/kcore.c | |||
@@ -546,6 +546,11 @@ static int open_kcore(struct inode *inode, struct file *filp) | |||
546 | return -EPERM; | 546 | return -EPERM; |
547 | if (kcore_need_update) | 547 | if (kcore_need_update) |
548 | kcore_update_ram(); | 548 | kcore_update_ram(); |
549 | if (i_size_read(inode) != proc_root_kcore->size) { | ||
550 | mutex_lock(&inode->i_mutex); | ||
551 | i_size_write(inode, proc_root_kcore->size); | ||
552 | mutex_unlock(&inode->i_mutex); | ||
553 | } | ||
549 | return 0; | 554 | return 0; |
550 | } | 555 | } |
551 | 556 | ||