X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=ipc%2Fnamespace.c;h=59451c1e214d71f1b771b764d309b20759e19eb6;hb=2c5cb2770392fb9c5d8518688c8bc61986d70dc6;hp=4be6581d3b7fa075c3d899e889ce6d09e8fcca86;hpb=1025c04cecd19882e28f16c4004034b475c372c5;p=firefly-linux-kernel-4.4.55.git diff --git a/ipc/namespace.c b/ipc/namespace.c index 4be6581d3b7f..59451c1e214d 100644 --- a/ipc/namespace.c +++ b/ipc/namespace.c @@ -81,7 +81,7 @@ void free_ipcs(struct ipc_namespace *ns, struct ipc_ids *ids, int next_id; int total, in_use; - down_write(&ids->rw_mutex); + down_write(&ids->rwsem); in_use = ids->in_use; @@ -89,11 +89,12 @@ void free_ipcs(struct ipc_namespace *ns, struct ipc_ids *ids, perm = idr_find(&ids->ipcs_idr, next_id); if (perm == NULL) continue; - ipc_lock_by_ptr(perm); + rcu_read_lock(); + ipc_lock_object(perm); free(ns, perm); total++; } - up_write(&ids->rw_mutex); + up_write(&ids->rwsem); } static void free_ipc_ns(struct ipc_namespace *ns)