diff options
Diffstat (limited to 'fs')
-rw-r--r-- | fs/proc/base.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/fs/proc/base.c b/fs/proc/base.c index 989e3078d7af..85e06e498078 100644 --- a/fs/proc/base.c +++ b/fs/proc/base.c | |||
@@ -360,6 +360,15 @@ static int lstats_open(struct inode *inode, struct file *file) | |||
360 | return ret; | 360 | return ret; |
361 | } | 361 | } |
362 | 362 | ||
363 | static int lstats_release(struct inode *inode, struct file *file) | ||
364 | { | ||
365 | struct seq_file *m = file->private_data; | ||
366 | struct task_struct *task = m->private; | ||
367 | |||
368 | put_task_struct(task); | ||
369 | return single_release(inode, file); | ||
370 | } | ||
371 | |||
363 | static ssize_t lstats_write(struct file *file, const char __user *buf, | 372 | static ssize_t lstats_write(struct file *file, const char __user *buf, |
364 | size_t count, loff_t *offs) | 373 | size_t count, loff_t *offs) |
365 | { | 374 | { |
@@ -378,7 +387,7 @@ static const struct file_operations proc_lstats_operations = { | |||
378 | .read = seq_read, | 387 | .read = seq_read, |
379 | .write = lstats_write, | 388 | .write = lstats_write, |
380 | .llseek = seq_lseek, | 389 | .llseek = seq_lseek, |
381 | .release = single_release, | 390 | .release = lstats_release, |
382 | }; | 391 | }; |
383 | 392 | ||
384 | #endif | 393 | #endif |