summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
Diffstat (limited to 'fs')
-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 3d0485c..5601337 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;
}
OpenPOWER on IntegriCloud