Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 387602df authored by wangweidong's avatar wangweidong Committed by David S. Miller
Browse files

sctp: remove macros sctp_write_[un]_lock



Redefined write_[un]lock to sctp_write_[un]lock for user space
friendly code which we haven't use in years, so removing them.

Signed-off-by: default avatarWang Weidong <wangweidong1@huawei.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 3c8e43ba
Loading
Loading
Loading
Loading
+0 −2
Original line number Original line Diff line number Diff line
@@ -171,8 +171,6 @@ extern struct kmem_cache *sctp_bucket_cachep __read_mostly;
 */
 */


/* spin lock wrappers. */
/* spin lock wrappers. */
#define sctp_write_lock(lock)   write_lock(lock)
#define sctp_write_unlock(lock) write_unlock(lock)
#define sctp_read_lock(lock)    read_lock(lock)
#define sctp_read_lock(lock)    read_lock(lock)
#define sctp_read_unlock(lock)  read_unlock(lock)
#define sctp_read_unlock(lock)  read_unlock(lock)


+8 −8
Original line number Original line Diff line number Diff line
@@ -718,9 +718,9 @@ static void __sctp_hash_endpoint(struct sctp_endpoint *ep)
	epb->hashent = sctp_ep_hashfn(net, epb->bind_addr.port);
	epb->hashent = sctp_ep_hashfn(net, epb->bind_addr.port);
	head = &sctp_ep_hashtable[epb->hashent];
	head = &sctp_ep_hashtable[epb->hashent];


	sctp_write_lock(&head->lock);
	write_lock(&head->lock);
	hlist_add_head(&epb->node, &head->chain);
	hlist_add_head(&epb->node, &head->chain);
	sctp_write_unlock(&head->lock);
	write_unlock(&head->lock);
}
}


/* Add an endpoint to the hash. Local BH-safe. */
/* Add an endpoint to the hash. Local BH-safe. */
@@ -744,9 +744,9 @@ static void __sctp_unhash_endpoint(struct sctp_endpoint *ep)


	head = &sctp_ep_hashtable[epb->hashent];
	head = &sctp_ep_hashtable[epb->hashent];


	sctp_write_lock(&head->lock);
	write_lock(&head->lock);
	hlist_del_init(&epb->node);
	hlist_del_init(&epb->node);
	sctp_write_unlock(&head->lock);
	write_unlock(&head->lock);
}
}


/* Remove endpoint from the hash.  Local BH-safe. */
/* Remove endpoint from the hash.  Local BH-safe. */
@@ -798,9 +798,9 @@ static void __sctp_hash_established(struct sctp_association *asoc)


	head = &sctp_assoc_hashtable[epb->hashent];
	head = &sctp_assoc_hashtable[epb->hashent];


	sctp_write_lock(&head->lock);
	write_lock(&head->lock);
	hlist_add_head(&epb->node, &head->chain);
	hlist_add_head(&epb->node, &head->chain);
	sctp_write_unlock(&head->lock);
	write_unlock(&head->lock);
}
}


/* Add an association to the hash. Local BH-safe. */
/* Add an association to the hash. Local BH-safe. */
@@ -828,9 +828,9 @@ static void __sctp_unhash_established(struct sctp_association *asoc)


	head = &sctp_assoc_hashtable[epb->hashent];
	head = &sctp_assoc_hashtable[epb->hashent];


	sctp_write_lock(&head->lock);
	write_lock(&head->lock);
	hlist_del_init(&epb->node);
	hlist_del_init(&epb->node);
	sctp_write_unlock(&head->lock);
	write_unlock(&head->lock);
}
}


/* Remove association from the hash table.  Local BH-safe. */
/* Remove association from the hash table.  Local BH-safe. */