Re: [patch] inotify: a replacement for dnotify

From: Chris Wright
Date: Wed Dec 01 2004 - 13:09:52 EST


* Jan Engelhardt (jengelh@xxxxxxxxxxxxxxx) wrote:
> >> + user = find_user(current->user->uid);
> >> + if (!user)
> >> + return -ENOMEM;
> >
> >Can just be:
> >
> > get_uid(current->user);
>
> What about current->euid?

Not relevant. There's only one user_struct per task_struct. The change
is to simply grab a ref on it and go rather than doing a full look up
in the uid hash as a method to get a refcount on it.

thanks,
-chris
--
Linux Security Modules http://lsm.immunix.org http://lsm.bkbits.net
-
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/