[PATCH 1/8] af_unix: take address assignment/hash insertion into a new helper

2021-02-22 Thread Al Viro
Duplicated logics in all bind variants (autobind, bind-to-path, bind-to-abstract) gets taken into a common helper. Signed-off-by: Al Viro --- net/unix/af_unix.c | 26 +- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/net/unix/af_unix.c

Re: [PATCH 1/8] af_unix: take address assignment/hash insertion into a new helper

2021-02-20 Thread Al Viro
On Sat, Feb 20, 2021 at 12:31:49PM -0800, Cong Wang wrote: > Because it does not lock the lock, just compare: > > lock(); > __unix_set_addr(); > unlock(); > > to: > > lock(); > __unix_set_addr(); > > Clearly the former is more readable and less error-prone. Even > if you really want to do

Re: [PATCH 1/8] af_unix: take address assignment/hash insertion into a new helper

2021-02-20 Thread Cong Wang
On Sat, Feb 20, 2021 at 11:32 AM Al Viro wrote: > > On Sat, Feb 20, 2021 at 11:12:33AM -0800, Cong Wang wrote: > > On Thu, Feb 18, 2021 at 8:22 PM Al Viro wrote: > > > > > > Duplicated logics in all bind variants (autobind, bind-to-path, > > > bind-to-abstract) gets taken into a common helper. >

Re: [PATCH 1/8] af_unix: take address assignment/hash insertion into a new helper

2021-02-20 Thread Al Viro
On Sat, Feb 20, 2021 at 11:12:33AM -0800, Cong Wang wrote: > On Thu, Feb 18, 2021 at 8:22 PM Al Viro wrote: > > > > Duplicated logics in all bind variants (autobind, bind-to-path, > > bind-to-abstract) gets taken into a common helper. > > > > Signed-off-by: Al Viro > > --- > >

Re: [PATCH 1/8] af_unix: take address assignment/hash insertion into a new helper

2021-02-20 Thread Cong Wang
On Thu, Feb 18, 2021 at 8:22 PM Al Viro wrote: > > Duplicated logics in all bind variants (autobind, bind-to-path, > bind-to-abstract) gets taken into a common helper. > > Signed-off-by: Al Viro > --- > net/unix/af_unix.c | 30 +++--- > 1 file changed, 15 insertions(+),

[PATCH 1/8] af_unix: take address assignment/hash insertion into a new helper

2021-02-18 Thread Al Viro
Duplicated logics in all bind variants (autobind, bind-to-path, bind-to-abstract) gets taken into a common helper. Signed-off-by: Al Viro --- net/unix/af_unix.c | 30 +++--- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/net/unix/af_unix.c