From patchwork Mon Jun 20 20:15:41 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoph Hellwig X-Patchwork-Id: 898402 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter2.kernel.org (8.14.4/8.14.4) with ESMTP id p5KKOIBe013544 for ; Mon, 20 Jun 2011 20:24:18 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754363Ab1FTUUh (ORCPT ); Mon, 20 Jun 2011 16:20:37 -0400 Received: from 173-166-109-252-newengland.hfc.comcastbusiness.net ([173.166.109.252]:52954 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750945Ab1FTUUg (ORCPT ); Mon, 20 Jun 2011 16:20:36 -0400 Received: from hch by bombadil.infradead.org with local (Exim 4.76 #1 (Red Hat Linux)) id 1QYkxU-0007Ni-0O; Mon, 20 Jun 2011 20:20:32 +0000 Message-Id: <20110620202031.976772585@bombadil.infradead.org> User-Agent: quilt/0.48-1 Date: Mon, 20 Jun 2011 16:15:41 -0400 From: Christoph Hellwig To: viro@zeniv.linux.org.uk, tglx@linutronix.de Cc: linux-fsdevel@vger.kernel.org, linux-ext4@vger.kernel.org, linux-btrfs@vger.kernel.org, hirofumi@mail.parknet.co.jp, mfasheh@suse.com, jlbec@evilplan.org Subject: [PATCH 8/8] rw_semaphore: remove up/down_read_non_owner References: <20110620201533.847236272@bombadil.infradead.org> Content-Disposition: inline; filename=remove-rw_semaphore-non_owner X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org See http://www.infradead.org/rpr.html Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter2.kernel.org [140.211.167.43]); Mon, 20 Jun 2011 20:24:19 +0000 (UTC) Now that the last users is gone these can be removed. Signed-off-by: Christoph Hellwig --- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Index: linux-2.6/include/linux/rwsem.h =================================================================== --- linux-2.6.orig/include/linux/rwsem.h 2011-06-20 14:58:15.449148809 +0200 +++ linux-2.6/include/linux/rwsem.h 2011-06-20 14:58:30.915814691 +0200 @@ -124,19 +124,9 @@ extern void downgrade_write(struct rw_se */ extern void down_read_nested(struct rw_semaphore *sem, int subclass); extern void down_write_nested(struct rw_semaphore *sem, int subclass); -/* - * Take/release a lock when not the owner will release it. - * - * [ This API should be avoided as much as possible - the - * proper abstraction for this case is completions. ] - */ -extern void down_read_non_owner(struct rw_semaphore *sem); -extern void up_read_non_owner(struct rw_semaphore *sem); #else # define down_read_nested(sem, subclass) down_read(sem) # define down_write_nested(sem, subclass) down_write(sem) -# define down_read_non_owner(sem) down_read(sem) -# define up_read_non_owner(sem) up_read(sem) #endif #endif /* _LINUX_RWSEM_H */ Index: linux-2.6/kernel/rwsem.c =================================================================== --- linux-2.6.orig/kernel/rwsem.c 2011-06-20 14:58:34.509147842 +0200 +++ linux-2.6/kernel/rwsem.c 2011-06-20 14:58:47.479147187 +0200 @@ -117,15 +117,6 @@ void down_read_nested(struct rw_semaphor EXPORT_SYMBOL(down_read_nested); -void down_read_non_owner(struct rw_semaphore *sem) -{ - might_sleep(); - - __down_read(sem); -} - -EXPORT_SYMBOL(down_read_non_owner); - void down_write_nested(struct rw_semaphore *sem, int subclass) { might_sleep(); @@ -136,13 +127,6 @@ void down_write_nested(struct rw_semapho EXPORT_SYMBOL(down_write_nested); -void up_read_non_owner(struct rw_semaphore *sem) -{ - __up_read(sem); -} - -EXPORT_SYMBOL(up_read_non_owner); - #endif