summaryrefslogtreecommitdiffstats
path: root/ipc/sem.c
diff options
context:
space:
mode:
Diffstat (limited to 'ipc/sem.c')
-rw-r--r--ipc/sem.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/ipc/sem.c b/ipc/sem.c
index c6c50370504c..31b138b9e756 100644
--- a/ipc/sem.c
+++ b/ipc/sem.c
@@ -122,7 +122,7 @@ struct sem_undo {
122 * that may be shared among all a CLONE_SYSVSEM task group. 122 * that may be shared among all a CLONE_SYSVSEM task group.
123 */ 123 */
124struct sem_undo_list { 124struct sem_undo_list {
125 atomic_t refcnt; 125 refcount_t refcnt;
126 spinlock_t lock; 126 spinlock_t lock;
127 struct list_head list_proc; 127 struct list_head list_proc;
128}; 128};
@@ -1642,7 +1642,7 @@ static inline int get_undo_list(struct sem_undo_list **undo_listp)
1642 if (undo_list == NULL) 1642 if (undo_list == NULL)
1643 return -ENOMEM; 1643 return -ENOMEM;
1644 spin_lock_init(&undo_list->lock); 1644 spin_lock_init(&undo_list->lock);
1645 atomic_set(&undo_list->refcnt, 1); 1645 refcount_set(&undo_list->refcnt, 1);
1646 INIT_LIST_HEAD(&undo_list->list_proc); 1646 INIT_LIST_HEAD(&undo_list->list_proc);
1647 1647
1648 current->sysvsem.undo_list = undo_list; 1648 current->sysvsem.undo_list = undo_list;
@@ -2041,7 +2041,7 @@ int copy_semundo(unsigned long clone_flags, struct task_struct *tsk)
2041 error = get_undo_list(&undo_list); 2041 error = get_undo_list(&undo_list);
2042 if (error) 2042 if (error)
2043 return error; 2043 return error;
2044 atomic_inc(&undo_list->refcnt); 2044 refcount_inc(&undo_list->refcnt);
2045 tsk->sysvsem.undo_list = undo_list; 2045 tsk->sysvsem.undo_list = undo_list;
2046 } else 2046 } else
2047 tsk->sysvsem.undo_list = NULL; 2047 tsk->sysvsem.undo_list = NULL;
@@ -2070,7 +2070,7 @@ void exit_sem(struct task_struct *tsk)
2070 return; 2070 return;
2071 tsk->sysvsem.undo_list = NULL; 2071 tsk->sysvsem.undo_list = NULL;
2072 2072
2073 if (!atomic_dec_and_test(&ulp->refcnt)) 2073 if (!refcount_dec_and_test(&ulp->refcnt))
2074 return; 2074 return;
2075 2075
2076 for (;;) { 2076 for (;;) {