aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--fs/proc/kcore.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/fs/proc/kcore.c b/fs/proc/kcore.c
index 3d0485c361c..56013371f9f 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)
return -EPERM;
if (kcore_need_update)
kcore_update_ram();
+ if (i_size_read(inode) != proc_root_kcore->size) {
+ mutex_lock(&inode->i_mutex);
+ i_size_write(inode, proc_root_kcore->size);
+ mutex_unlock(&inode->i_mutex);
+ }
return 0;
}