public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: sandeen@sandeen.net
To: xfs@oss.sgi.com
Subject: [PATCH] standardize on one sema init macro
Date: Tue, 22 Aug 2006 22:47:19 -0500 (CDT)	[thread overview]
Message-ID: <20060823034719.AD5B418DAFEC7@sandeen.net> (raw)

One sema to rule them all, one sema to find them...

how many sema init routines does one really need after all?

Signed-off-by: Eric Sandeen <sandeen@sandeen.net>

 linux-2.4/sema.h |    2 --
 linux-2.6/sema.h |    2 --
 xfs_iget.c       |    2 +-
 3 files changed, 1 insertion(+), 5 deletions(-)


Index: xfs-linux/linux-2.4/sema.h
===================================================================
--- xfs-linux.orig/linux-2.4/sema.h
+++ xfs-linux/linux-2.4/sema.h
@@ -29,8 +29,6 @@
 
 typedef struct semaphore sema_t;
 
-#define init_sema(sp, val, c, d)	sema_init(sp, val)
-#define initsema(sp, val)		sema_init(sp, val)
 #define initnsema(sp, val, name)	sema_init(sp, val)
 #define psema(sp, b)			down(sp)
 #define vsema(sp)			up(sp)
Index: xfs-linux/linux-2.6/sema.h
===================================================================
--- xfs-linux.orig/linux-2.6/sema.h
+++ xfs-linux/linux-2.6/sema.h
@@ -29,8 +29,6 @@
 
 typedef struct semaphore sema_t;
 
-#define init_sema(sp, val, c, d)	sema_init(sp, val)
-#define initsema(sp, val)		sema_init(sp, val)
 #define initnsema(sp, val, name)	sema_init(sp, val)
 #define psema(sp, b)			down(sp)
 #define vsema(sp)			up(sp)
Index: xfs-linux/xfs_iget.c
===================================================================
--- xfs-linux.orig/xfs_iget.c
+++ xfs-linux/xfs_iget.c
@@ -546,7 +546,7 @@ xfs_inode_lock_init(
 	mrlock_init(&ip->i_iolock, MRLOCK_BARRIER, "xfsio", vp->v_number);
 	init_waitqueue_head(&ip->i_ipin_wait);
 	atomic_set(&ip->i_pincount, 0);
-	init_sema(&ip->i_flock, 1, "xfsfino", vp->v_number);
+	initnsema(&ip->i_flock, 1, "xfsfino");
 }
 
 /*

                 reply	other threads:[~2006-08-23  3:48 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20060823034719.AD5B418DAFEC7@sandeen.net \
    --to=sandeen@sandeen.net \
    --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