diff options
Diffstat (limited to 'net/unix/af_unix.c')
-rw-r--r-- | net/unix/af_unix.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/net/unix/af_unix.c b/net/unix/af_unix.c index c88525403d2e..b9ee766054f6 100644 --- a/net/unix/af_unix.c +++ b/net/unix/af_unix.c | |||
@@ -212,7 +212,7 @@ EXPORT_SYMBOL_GPL(unix_peer_get); | |||
212 | 212 | ||
213 | static inline void unix_release_addr(struct unix_address *addr) | 213 | static inline void unix_release_addr(struct unix_address *addr) |
214 | { | 214 | { |
215 | if (atomic_dec_and_test(&addr->refcnt)) | 215 | if (refcount_dec_and_test(&addr->refcnt)) |
216 | kfree(addr); | 216 | kfree(addr); |
217 | } | 217 | } |
218 | 218 | ||
@@ -864,7 +864,7 @@ static int unix_autobind(struct socket *sock) | |||
864 | goto out; | 864 | goto out; |
865 | 865 | ||
866 | addr->name->sun_family = AF_UNIX; | 866 | addr->name->sun_family = AF_UNIX; |
867 | atomic_set(&addr->refcnt, 1); | 867 | refcount_set(&addr->refcnt, 1); |
868 | 868 | ||
869 | retry: | 869 | retry: |
870 | addr->len = sprintf(addr->name->sun_path+1, "%05x", ordernum) + 1 + sizeof(short); | 870 | addr->len = sprintf(addr->name->sun_path+1, "%05x", ordernum) + 1 + sizeof(short); |
@@ -1040,7 +1040,7 @@ static int unix_bind(struct socket *sock, struct sockaddr *uaddr, int addr_len) | |||
1040 | memcpy(addr->name, sunaddr, addr_len); | 1040 | memcpy(addr->name, sunaddr, addr_len); |
1041 | addr->len = addr_len; | 1041 | addr->len = addr_len; |
1042 | addr->hash = hash ^ sk->sk_type; | 1042 | addr->hash = hash ^ sk->sk_type; |
1043 | atomic_set(&addr->refcnt, 1); | 1043 | refcount_set(&addr->refcnt, 1); |
1044 | 1044 | ||
1045 | if (sun_path[0]) { | 1045 | if (sun_path[0]) { |
1046 | addr->hash = UNIX_HASH_SIZE; | 1046 | addr->hash = UNIX_HASH_SIZE; |
@@ -1335,7 +1335,7 @@ restart: | |||
1335 | 1335 | ||
1336 | /* copy address information from listening to new sock*/ | 1336 | /* copy address information from listening to new sock*/ |
1337 | if (otheru->addr) { | 1337 | if (otheru->addr) { |
1338 | atomic_inc(&otheru->addr->refcnt); | 1338 | refcount_inc(&otheru->addr->refcnt); |
1339 | newu->addr = otheru->addr; | 1339 | newu->addr = otheru->addr; |
1340 | } | 1340 | } |
1341 | if (otheru->path.dentry) { | 1341 | if (otheru->path.dentry) { |