lkml.org 
[lkml]   [2002]   [Aug]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH][RFC] sigurg/sigio cleanup for 2.5.31
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/

\
 
 \ /
  Last update: 2005-03-22 13:28    [W:0.150 / U:0.892 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site