lkml.org 
[lkml]   [2012]   [Feb]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 01/11] perf: Push file_update_time() into perf_mmap_fault()
From
Date
On Thu, 2012-02-16 at 14:46 +0100, Jan Kara wrote:
> CC: Peter Zijlstra <a.p.zijlstra@chello.nl>
> CC: Ingo Molnar <mingo@elte.hu>
> CC: Paul Mackerras <paulus@samba.org>
> CC: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
> Signed-off-by: Jan Kara <jack@suse.cz>
> ---
> kernel/events/core.c | 4 +++-
> 1 files changed, 3 insertions(+), 1 deletions(-)
>
> diff --git a/kernel/events/core.c b/kernel/events/core.c
> index ba36013..61a67f3 100644
> --- a/kernel/events/core.c
> +++ b/kernel/events/core.c
> @@ -3316,8 +3316,10 @@ static int perf_mmap_fault(struct vm_area_struct *vma, struct vm_fault *vmf)
> int ret = VM_FAULT_SIGBUS;
>
> if (vmf->flags & FAULT_FLAG_MKWRITE) {
> - if (vmf->pgoff == 0)
> + if (vmf->pgoff == 0) {
> ret = 0;
> + file_update_time(vma->vm_file);
> + }
> return ret;
> }

Its an anon filedesc, there's no actual file and while I guess one could
probably call fstat() on it, people really shouldn't care.

So feel free to introduce this patch to the bitbucket.


\
 
 \ /
  Last update: 2012-02-16 14:53    [W:0.256 / U:0.228 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site