Re: [PATCH][RFC] sigurg/sigio cleanup for 2.5.31

James Morris (jmorris@intercode.com.au)
Fri, 16 Aug 2002 10:10:18 +1000 (EST)


On Thu, 15 Aug 2002, Matthew Wilcox wrote:

> In general, this is good... I think it could be better:
>
> > + lock_kernel();
> > + error = f_setown(filp, current->pid);
> > + unlock_kernel();
>
> There are a lot of these, and you even batch it up as sock_setown()
> later. May I suggest renaming f_setown to __setown and sock_setown
> to f_setown?

Sounds like a good idea.

> this one's particularly silly -- now you've done the good job of wrapping
> the security_ops up inside f_setown this can simply be:
>
> lock_kernel();
> err = f_setown(filp, arg);
> unlock_kernel();
> break;

Yep.

> Might make more sense to refactor as:
>
> void sk_send_sigurg(struct sock *sk)
> {
> if (!sk->socket || !sk->socket->file)
> return;
> if (send_sigurg(&sk->socket->file->f_owner))
> sk_wake_async(sk, 3, POLL_PRI);
> }
>

Possibly. I guess it's up to the networking guys -- is there any point in
keeping these separate? I can't see any with the current code.

Thanks for the feedback.

- James

-- 
James Morris
<jmorris@intercode.com.au>

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