[Devel] Re: [RFC][PATCH 1/3]: Replace pid_t in autofs with struct pid reference.

Sukadev Bhattiprolu sukadev at us.ibm.com
Thu Jan 25 19:11:15 PST 2007


Cedric Le Goater [clg at fr.ibm.com] wrote:
| comments below,
| 
| >  	autofs_hash_nuke(sbi);
| >  	for ( n = 0 ; n < AUTOFS_MAX_SYMLINKS ; n++ ) {
| >  		if ( test_bit(n, sbi->symlink_bitmap) )
| 
| too many white spaces. may be you could fix those at the same time ?

There are too many of those errors in the autofs/autofs4 files. I am
moving all those changes to a separate patch so the main patch stays
small. Let me know if thats a bad idea.

| > +	if ( parse_options(data, &pipefd, &root_inode->i_uid,
| > +				&root_inode->i_gid, &sbi->oz_pgrp, &minproto,
| > +				&maxproto) ) {
| 
| I would keep the old prototype of parse_options
| 
| >  		printk("autofs: called with bogus options\n");
| >  		goto fail_dput;
| >  	}
| 
| and do the find_get_pid() here. it looks simpler for me.

Agree.

| > +	DPRINTK(("autofs_lookup: pid = %u, pgrp = %u, catatonic = %d, "
| > +				"oz_mode = %d\n", pid_nr(task_pid(current)),
| > +				process_group(current), sbi->catatonic,
| > +				oz_mode));
| 
| 
| you can keep current->pid I think
| 

I am not sure. If a process unshares its pid-ns and then used to automount
in the child ns, won't we print the wrong pid ?

_______________________________________________
Containers mailing list
Containers at lists.osdl.org
https://lists.osdl.org/mailman/listinfo/containers




More information about the Devel mailing list