mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
[PATCH] f_count may wrap around
make it atomic_long_t; while we are at it, get rid of useless checks in affs, hfs and hpfs - ->open() always has it equal to 1, ->release() - to 0. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
parent
3c333937ee
commit
516e0cc564
11 changed files with 27 additions and 39 deletions
|
@ -603,7 +603,7 @@ static struct sock * unix_create1(struct net *net, struct socket *sock)
|
|||
u->dentry = NULL;
|
||||
u->mnt = NULL;
|
||||
spin_lock_init(&u->lock);
|
||||
atomic_set(&u->inflight, 0);
|
||||
atomic_long_set(&u->inflight, 0);
|
||||
INIT_LIST_HEAD(&u->link);
|
||||
mutex_init(&u->readlock); /* single task reading lock */
|
||||
init_waitqueue_head(&u->peer_wait);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue