public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Dave Chinner <david@fromorbit.com>
To: xfs@oss.sgi.com
Cc: matthew@wil.cx, linux-kernel@vger.kernel.org,
	Dave Chinner <david@fromorbit.com>
Subject: [PATCH 5/6] Remove the sema_t from XFS.
Date: Thu, 26 Jun 2008 14:41:16 +1000	[thread overview]
Message-ID: <1214455277-6387-6-git-send-email-david@fromorbit.com> (raw)
In-Reply-To: <1214455277-6387-1-git-send-email-david@fromorbit.com>

Now that all users of the sema_t are gone from XFS we
can finally kill it.

Signed-off-by: Dave Chinner <david@fromorbit.com>
---
 fs/xfs/linux-2.6/sema.h      |   52 ------------------------------------------
 fs/xfs/linux-2.6/xfs_linux.h |    2 +-
 2 files changed, 1 insertions(+), 53 deletions(-)
 delete mode 100644 fs/xfs/linux-2.6/sema.h

diff --git a/fs/xfs/linux-2.6/sema.h b/fs/xfs/linux-2.6/sema.h
deleted file mode 100644
index 3abe7e9..0000000
--- a/fs/xfs/linux-2.6/sema.h
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Copyright (c) 2000-2002,2005 Silicon Graphics, Inc.
- * All Rights Reserved.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it would be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write the Free Software Foundation,
- * Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
- */
-#ifndef __XFS_SUPPORT_SEMA_H__
-#define __XFS_SUPPORT_SEMA_H__
-
-#include <linux/time.h>
-#include <linux/wait.h>
-#include <linux/semaphore.h>
-#include <asm/atomic.h>
-
-/*
- * sema_t structure just maps to struct semaphore in Linux kernel.
- */
-
-typedef struct semaphore sema_t;
-
-#define initnsema(sp, val, name)	sema_init(sp, val)
-#define psema(sp, b)			down(sp)
-#define vsema(sp)			up(sp)
-#define freesema(sema)			do { } while (0)
-
-static inline int issemalocked(sema_t *sp)
-{
-	return down_trylock(sp) || (up(sp), 0);
-}
-
-/*
- * Map cpsema (try to get the sema) to down_trylock. We need to switch
- * the return values since cpsema returns 1 (acquired) 0 (failed) and
- * down_trylock returns the reverse 0 (acquired) 1 (failed).
- */
-static inline int cpsema(sema_t *sp)
-{
-	return down_trylock(sp) ? 0 : 1;
-}
-
-#endif /* __XFS_SUPPORT_SEMA_H__ */
diff --git a/fs/xfs/linux-2.6/xfs_linux.h b/fs/xfs/linux-2.6/xfs_linux.h
index 4d45d93..4fb838f 100644
--- a/fs/xfs/linux-2.6/xfs_linux.h
+++ b/fs/xfs/linux-2.6/xfs_linux.h
@@ -45,13 +45,13 @@
 #include <mrlock.h>
 #include <sv.h>
 #include <mutex.h>
-#include <sema.h>
 #include <time.h>
 
 #include <support/ktrace.h>
 #include <support/debug.h>
 #include <support/uuid.h>
 
+#include <linux/semaphore.h>
 #include <linux/mm.h>
 #include <linux/kernel.h>
 #include <linux/blkdev.h>
-- 
1.5.5.4

  parent reply	other threads:[~2008-06-26  4:40 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-26  4:41 [PATCH 0/6] Remove most users of semaphores from XFS Dave Chinner
2008-06-26  4:41 ` [PATCH 1/6] Extend completions to provide XFS object flush requirements Dave Chinner
2008-06-26  7:46   ` Christoph Hellwig
2008-06-26 11:21     ` Dave Chinner
2008-06-26 13:07       ` Christoph Hellwig
2008-06-26 13:18         ` Dave Chinner
2008-06-26 11:26   ` Matthew Wilcox
2008-06-26 11:32     ` Dave Chinner
2008-06-26 11:42       ` Matthew Wilcox
2008-06-26 12:21         ` Dave Chinner
2008-06-26 12:40           ` Matthew Wilcox
2008-06-26 12:49             ` Christoph Hellwig
2008-06-26 13:02             ` Dave Chinner
2008-06-26 20:33   ` Daniel Walker
2008-06-27  1:52     ` Dave Chinner
2008-06-27  2:24     ` Matthew Wilcox
2008-06-27  3:26       ` Daniel Walker
2008-06-27  9:15         ` Christoph Hellwig
2008-06-27 14:37           ` Daniel Walker
2008-06-26  4:41 ` [PATCH 2/6] Replace inode flush semaphore with a completion Dave Chinner
2008-06-27  2:30   ` Matthew Wilcox
2008-06-27  4:13     ` Dave Chinner
2008-06-26  4:41 ` [PATCH 3/6] Replace dquot " Dave Chinner
2008-06-26  4:41 ` [PATCH 4/6] Replace the XFS buf iodone " Dave Chinner
2008-06-26  7:41   ` Christoph Hellwig
2008-06-26  4:41 ` Dave Chinner [this message]
2008-06-26  4:41 ` [PATCH 6/6] Clean up stale references to semaphores Dave Chinner
2008-06-26  7:47   ` Christoph Hellwig

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1214455277-6387-6-git-send-email-david@fromorbit.com \
    --to=david@fromorbit.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=matthew@wil.cx \
    --cc=xfs@oss.sgi.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox