Re: [RFC] ->get_link(), ->put_link() and cookies

From: Linus Torvalds
Date: Sun Jan 03 2016 - 15:42:37 EST


On Sun, Jan 3, 2016 at 12:21 PM, Al Viro <viro@xxxxxxxxxxxxxxxxxx> wrote:
>
> Just to make sure - that does include 13/13, presumably?

Ugh, no, I had set that aside and then forgot all about it.

I'm not sure about 13/13. I'm ok with it, but I'm not sure it's any
less confusing than the cookie was.

I like how it removes "put_link()" as a callback, but at the same time
I think it's even more abstract than the cookie was.

The main worry I have is that the naming is generic, but there's only
a single very specialized use for it. Do we expect other uses?

Because if not, I think it would be clearer if it was named to be more
concretely about putlink, and avoid the fact that it feels very
abstract.

Don't get me wrong - abstract generalized helper functions are cool.
But people aren't very abstract, and it tends to make for confusing
code when you aren't intimately familiar with the rules.

Linus
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/