Re: [tracepoint] cargo-culting considered harmful...

2013-01-25 Thread Mathieu Desnoyers
* Al Viro (v...@zeniv.linux.org.uk) wrote: > On Fri, Jan 25, 2013 at 09:49:53AM -0500, Mathieu Desnoyers wrote: > > static > > void lttng_enumerate_task_fd(struct lttng_session *session, > > struct task_struct *p, char *tmp) > > { > > struct fdtable *fdt; > > struct

Re: [tracepoint] cargo-culting considered harmful...

2013-01-25 Thread Mathieu Desnoyers
* Steven Rostedt (rost...@goodmis.org) wrote: > On Fri, 2013-01-25 at 09:38 -0500, Mathieu Desnoyers wrote: > > > Yep, I'd be OK with removing this example, since now all users are > > expected to user TRACE_EVENT(), which is built on top of tracepoints. > > Can I get your Acked-by for the

Re: [tracepoint] cargo-culting considered harmful...

2013-01-25 Thread Al Viro
On Fri, Jan 25, 2013 at 09:49:53AM -0500, Mathieu Desnoyers wrote: > static > void lttng_enumerate_task_fd(struct lttng_session *session, > struct task_struct *p, char *tmp) > { > struct fdtable *fdt; > struct file *filp; > unsigned int i; > const

Re: [tracepoint] cargo-culting considered harmful...

2013-01-25 Thread Steven Rostedt
On Fri, 2013-01-25 at 09:38 -0500, Mathieu Desnoyers wrote: > Yep, I'd be OK with removing this example, since now all users are > expected to user TRACE_EVENT(), which is built on top of tracepoints. Can I get your Acked-by for the following patch? -- Steve commit

Re: [tracepoint] cargo-culting considered harmful...

2013-01-25 Thread Mathieu Desnoyers
* Al Viro (v...@zeniv.linux.org.uk) wrote: > On Wed, Jan 23, 2013 at 03:51:47PM -0800, Andrew Morton wrote: > > > > note that > > > * file->f_path is already pinned down by open(), path_get() does not > > > provide anything extra. > > > * file->f_path.dentry is already pinned by open() *and*

Re: [tracepoint] cargo-culting considered harmful...

2013-01-25 Thread Mathieu Desnoyers
* Steven Rostedt (rost...@goodmis.org) wrote: > On Wed, Jan 23, 2013 at 10:55:24PM +, Al Viro wrote: > > In samples/tracepoints/tracepoint-probe-sample.c: > > /* > > * Here the caller only guarantees locking for struct file and struct inode. > > * Locking must therefore be done in the probe

Re: [tracepoint] cargo-culting considered harmful...

2013-01-25 Thread Mathieu Desnoyers
* Steven Rostedt (rost...@goodmis.org) wrote: On Wed, Jan 23, 2013 at 10:55:24PM +, Al Viro wrote: In samples/tracepoints/tracepoint-probe-sample.c: /* * Here the caller only guarantees locking for struct file and struct inode. * Locking must therefore be done in the probe to use

Re: [tracepoint] cargo-culting considered harmful...

2013-01-25 Thread Mathieu Desnoyers
* Al Viro (v...@zeniv.linux.org.uk) wrote: On Wed, Jan 23, 2013 at 03:51:47PM -0800, Andrew Morton wrote: note that * file-f_path is already pinned down by open(), path_get() does not provide anything extra. * file-f_path.dentry is already pinned by open() *and* path_get()

Re: [tracepoint] cargo-culting considered harmful...

2013-01-25 Thread Steven Rostedt
On Fri, 2013-01-25 at 09:38 -0500, Mathieu Desnoyers wrote: Yep, I'd be OK with removing this example, since now all users are expected to user TRACE_EVENT(), which is built on top of tracepoints. Can I get your Acked-by for the following patch? -- Steve commit

Re: [tracepoint] cargo-culting considered harmful...

2013-01-25 Thread Al Viro
On Fri, Jan 25, 2013 at 09:49:53AM -0500, Mathieu Desnoyers wrote: static void lttng_enumerate_task_fd(struct lttng_session *session, struct task_struct *p, char *tmp) { struct fdtable *fdt; struct file *filp; unsigned int i; const unsigned

Re: [tracepoint] cargo-culting considered harmful...

2013-01-25 Thread Mathieu Desnoyers
* Steven Rostedt (rost...@goodmis.org) wrote: On Fri, 2013-01-25 at 09:38 -0500, Mathieu Desnoyers wrote: Yep, I'd be OK with removing this example, since now all users are expected to user TRACE_EVENT(), which is built on top of tracepoints. Can I get your Acked-by for the following

Re: [tracepoint] cargo-culting considered harmful...

2013-01-25 Thread Mathieu Desnoyers
* Al Viro (v...@zeniv.linux.org.uk) wrote: On Fri, Jan 25, 2013 at 09:49:53AM -0500, Mathieu Desnoyers wrote: static void lttng_enumerate_task_fd(struct lttng_session *session, struct task_struct *p, char *tmp) { struct fdtable *fdt; struct file *filp;

Re: [tracepoint] cargo-culting considered harmful...

2013-01-23 Thread Al Viro
On Wed, Jan 23, 2013 at 03:51:47PM -0800, Andrew Morton wrote: > > note that > > * file->f_path is already pinned down by open(), path_get() does not > > provide anything extra. > > * file->f_path.dentry is already pinned by open() *and* path_get() > > just above that dget(). > > *

Re: [tracepoint] cargo-culting considered harmful...

2013-01-23 Thread Andrew Morton
On Wed, 23 Jan 2013 22:55:24 + Al Viro wrote: > In samples/tracepoints/tracepoint-probe-sample.c: > /* > * Here the caller only guarantees locking for struct file and struct inode. > * Locking must therefore be done in the probe to use the dentry. > */ > static void

Re: [tracepoint] cargo-culting considered harmful...

2013-01-23 Thread Steven Rostedt
On Wed, Jan 23, 2013 at 10:55:24PM +, Al Viro wrote: > In samples/tracepoints/tracepoint-probe-sample.c: > /* > * Here the caller only guarantees locking for struct file and struct inode. > * Locking must therefore be done in the probe to use the dentry. > */ > static void

[tracepoint] cargo-culting considered harmful...

2013-01-23 Thread Al Viro
In samples/tracepoints/tracepoint-probe-sample.c: /* * Here the caller only guarantees locking for struct file and struct inode. * Locking must therefore be done in the probe to use the dentry. */ static void probe_subsys_event(void *ignore, struct inode

[tracepoint] cargo-culting considered harmful...

2013-01-23 Thread Al Viro
In samples/tracepoints/tracepoint-probe-sample.c: /* * Here the caller only guarantees locking for struct file and struct inode. * Locking must therefore be done in the probe to use the dentry. */ static void probe_subsys_event(void *ignore, struct inode

Re: [tracepoint] cargo-culting considered harmful...

2013-01-23 Thread Steven Rostedt
On Wed, Jan 23, 2013 at 10:55:24PM +, Al Viro wrote: In samples/tracepoints/tracepoint-probe-sample.c: /* * Here the caller only guarantees locking for struct file and struct inode. * Locking must therefore be done in the probe to use the dentry. */ static void probe_subsys_event(void

Re: [tracepoint] cargo-culting considered harmful...

2013-01-23 Thread Andrew Morton
On Wed, 23 Jan 2013 22:55:24 + Al Viro v...@zeniv.linux.org.uk wrote: In samples/tracepoints/tracepoint-probe-sample.c: /* * Here the caller only guarantees locking for struct file and struct inode. * Locking must therefore be done in the probe to use the dentry. */ static void

Re: [tracepoint] cargo-culting considered harmful...

2013-01-23 Thread Al Viro
On Wed, Jan 23, 2013 at 03:51:47PM -0800, Andrew Morton wrote: note that * file-f_path is already pinned down by open(), path_get() does not provide anything extra. * file-f_path.dentry is already pinned by open() *and* path_get() just above that dget(). * -d_name.name