2008-06-01 20:45:45

by Miklos Szeredi

[permalink] [raw]
Subject: Re: [patch 8/8] vfs: create file_remove_suid() helper

> > From: Miklos Szeredi <[email protected]>
> >
> > All calls to remove_suid() are made with a file pointer. This is not
> > accidental: similarly to file_update_time(), this function is called
> > when the file is written.
> >
> > So simplify callers by passing the file pointer instead of the dentry.
>
> It's not simplifying anything at all.

Yes it is, read the sentence carefully.

> You just move the pointer
> derefence down one step the callchain without any need.

Which means, that that pointer dereference will be done once instead
of in each caller, no? It's a gain (albeit a small one) is in code
cleanliness, and possibly in generated code size.

Miklos


2008-06-02 06:05:23

by Christoph Hellwig

[permalink] [raw]
Subject: Re: [patch 8/8] vfs: create file_remove_suid() helper

On Sun, Jun 01, 2008 at 10:45:30PM +0200, Miklos Szeredi wrote:
> Which means, that that pointer dereference will be done once instead
> of in each caller, no? It's a gain (albeit a small one) is in code
> cleanliness, and possibly in generated code size.

Again, it doesn't make anyhing simpler. It might be a cleanup at best.
I don't really care too much about this one because we could easily
change it back in case a caller appear that just has the inode, but the
tone you set here defintively doesn't help getting these trivial patches
without real gain in :)

2008-06-02 07:06:39

by Miklos Szeredi

[permalink] [raw]
Subject: Re: [patch 8/8] vfs: create file_remove_suid() helper

> > Which means, that that pointer dereference will be done once instead
> > of in each caller, no? It's a gain (albeit a small one) is in code
> > cleanliness, and possibly in generated code size.
>
> Again, it doesn't make anyhing simpler. It might be a cleanup at best.

OK, that depends what you call simpler :)

Yes it is a cleanup.

Miklos