From: Davidlohr Bueso Date: Wed, 11 Sep 2013 21:26:30 +0000 (-0700) Subject: ipc, shm: drop shm_lock_check X-Git-Tag: v3.11.6~6 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=c7f0866bc7a002a262ab9fb5e2aa19d2367ea114;p=thirdparty%2Fkernel%2Fstable.git ipc, shm: drop shm_lock_check commit 7a25dd9e042b2b94202a67e5551112f4ac87285a upstream. This function was replaced by a the lockless shm_obtain_object_check(), and no longer has any users. Signed-off-by: Davidlohr Bueso Cc: Sedat Dilek Cc: Rik van Riel Cc: Manfred Spraul Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Cc: Mike Galbraith Signed-off-by: Greg Kroah-Hartman --- diff --git a/ipc/shm.c b/ipc/shm.c index 92f5786c0cebe..d69739610fd43 100644 --- a/ipc/shm.c +++ b/ipc/shm.c @@ -167,17 +167,6 @@ static inline void shm_lock_by_ptr(struct shmid_kernel *ipcp) ipc_lock_object(&ipcp->shm_perm); } -static inline struct shmid_kernel *shm_lock_check(struct ipc_namespace *ns, - int id) -{ - struct kern_ipc_perm *ipcp = ipc_lock_check(&shm_ids(ns), id); - - if (IS_ERR(ipcp)) - return (struct shmid_kernel *)ipcp; - - return container_of(ipcp, struct shmid_kernel, shm_perm); -} - static void shm_rcu_free(struct rcu_head *head) { struct ipc_rcu *p = container_of(head, struct ipc_rcu, rcu);