lkml.org 
[lkml]   [2008]   [Apr]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: + afs-use-non-racy-method-for-proc-entries-creation.patch added to -mm tree
On Tue, Apr 15, 2008 at 04:56:01PM -0700, akpm@linux-foundation.org wrote:
> --- a/fs/afs/proc.c~afs-use-non-racy-method-for-proc-entries-creation
> +++ a/fs/afs/proc.c
> @@ -395,26 +396,20 @@ int afs_proc_cell_setup(struct afs_cell
> if (!cell->proc_dir)
> goto error_dir;
>
> - p = create_proc_entry("servers", 0, cell->proc_dir);
> + p = proc_create_data("servers", 0, cell->proc_dir,
> + &afs_proc_cell_servers_fops, cell);
> if (!p)
> goto error_servers;
> - p->proc_fops = &afs_proc_cell_servers_fops;
> - p->owner = THIS_MODULE;
> - p->data = cell;
>
> - p = create_proc_entry("vlservers", 0, cell->proc_dir);
> + p = proc_create_data("vlservers", 0, cell->proc_dir,
> + &afs_proc_cell_vlservers_fops, cell);
> if (!p)
> goto error_vlservers;
> - p->proc_fops = &afs_proc_cell_vlservers_fops;
> - p->owner = THIS_MODULE;
> - p->data = cell;
>
> - p = create_proc_entry("volumes", 0, cell->proc_dir);
> + p = proc_create_data("volumes", 0, cell->proc_dir,
> + &afs_proc_cell_volumes_fops, cell);
> if (!p)
> goto error_volumes;
> - p->proc_fops = &afs_proc_cell_volumes_fops;
> - p->owner = THIS_MODULE;
> - p->data = cell;

Checks for NULL "cell" are still in place, however.
In afs_proc_cell_servers_open(), afs_proc_cell_vlservers_open(), and
afs_proc_cell_volumes_fops().



\
 
 \ /
  Last update: 2008-04-20 15:59    [W:0.026 / U:4.836 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site