* [PATCH] rename locking functions - fix a blunder in initial patches
@ 2005-08-18 21:09 Jesper Juhl
2005-08-18 23:02 ` Nathan Scott
0 siblings, 1 reply; 3+ messages in thread
From: Jesper Juhl @ 2005-08-18 21:09 UTC (permalink / raw)
To: Andrew Morton; +Cc: linux-kernel
Andrew,
Sorry about the blunder in the initial patches. Where I thought I'd done a
full kernel compile to test it turned out that I'd only (by mistake) done a
build of my regular config which of course didn't cover everything.
This time around I've done a full allyesconfig build of the kernel as well
as read through my patches again to see if I could spot additional errors. I
believe that if you apply the patch below, on top of the ones from yesterday,
then everything should be OK and there should be no need to drop the original
patches from -mm.
I opted to keep the defines around but give them xfs specific names instead of
changing the calls to call init_sema() directly as I asume the XFS people have
some good reason to have those defines with extra arguments around. In any case,
if getting rid of the defines is prefered, then that's something that can easily
be done later.
Fix a blunder in original patch set.
Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
---
fs/xfs/linux-2.6/sema.h | 6 +++---
fs/xfs/quota/xfs_dquot.c | 2 +-
fs/xfs/xfs_iget.c | 2 +-
fs/xfs/xfs_mount.c | 2 +-
4 files changed, 6 insertions(+), 6 deletions(-)
--- linux-2.6.13-rc6-git9/fs/xfs/linux-2.6/sema.h~ 2005-08-18 21:00:35.000000000 +0200
+++ linux-2.6.13-rc6-git9/fs/xfs/linux-2.6/sema.h 2005-08-18 20:50:03.000000000 +0200
@@ -43,9 +43,9 @@
typedef struct semaphore sema_t;
-#define init_sema(sp, val, c, d) init_sema(sp, val)
-#define initsema(sp, val) init_sema(sp, val)
-#define initnsema(sp, val, name) init_sema(sp, val)
+#define xfs_init_sema(sp, val, c, d) init_sema(sp, val)
+#define xfs_initsema(sp, val) init_sema(sp, val)
+#define xfs_initnsema(sp, val, name) init_sema(sp, val)
#define psema(sp, b) down(sp)
#define vsema(sp) up(sp)
#define valusema(sp) (atomic_read(&(sp)->count))
--- linux-2.6.13-rc6-git9/fs/xfs/quota/xfs_dquot.c~ 2005-08-18 20:50:33.000000000 +0200
+++ linux-2.6.13-rc6-git9/fs/xfs/quota/xfs_dquot.c 2005-08-18 20:50:33.000000000 +0200
@@ -121,7 +121,7 @@ xfs_qm_dqinit(
if (brandnewdquot) {
dqp->dq_flnext = dqp->dq_flprev = dqp;
mutex_init(&dqp->q_qlock, MUTEX_DEFAULT, "xdq");
- initnsema(&dqp->q_flock, 1, "fdq");
+ xfs_initnsema(&dqp->q_flock, 1, "fdq");
sv_init(&dqp->q_pinwait, SV_DEFAULT, "pdq");
#ifdef XFS_DQUOT_TRACE
--- linux-2.6.13-rc6-git9/fs/xfs/xfs_mount.c~ 2005-08-18 20:53:05.000000000 +0200
+++ linux-2.6.13-rc6-git9/fs/xfs/xfs_mount.c 2005-08-18 20:53:05.000000000 +0200
@@ -133,7 +133,7 @@ xfs_mount_init(void)
AIL_LOCKINIT(&mp->m_ail_lock, "xfs_ail");
spinlock_init(&mp->m_sb_lock, "xfs_sb");
mutex_init(&mp->m_ilock, MUTEX_DEFAULT, "xfs_ilock");
- initnsema(&mp->m_growlock, 1, "xfs_grow");
+ xfs_initnsema(&mp->m_growlock, 1, "xfs_grow");
/*
* Initialize the AIL.
*/
--- linux-2.6.13-rc6-git9/fs/xfs/xfs_iget.c~ 2005-08-18 20:49:59.000000000 +0200
+++ linux-2.6.13-rc6-git9/fs/xfs/xfs_iget.c 2005-08-18 20:49:59.000000000 +0200
@@ -575,7 +575,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);
+ xfs_init_sema(&ip->i_flock, 1, "xfsfino", vp->v_number);
}
/*
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] rename locking functions - fix a blunder in initial patches
2005-08-18 21:09 [PATCH] rename locking functions - fix a blunder in initial patches Jesper Juhl
@ 2005-08-18 23:02 ` Nathan Scott
2005-08-18 23:06 ` Jesper Juhl
0 siblings, 1 reply; 3+ messages in thread
From: Nathan Scott @ 2005-08-18 23:02 UTC (permalink / raw)
To: Jesper Juhl; +Cc: Andrew Morton, linux-kernel
On Thu, Aug 18, 2005 at 11:09:33PM +0200, Jesper Juhl wrote:
> ...
> have if getting rid of the defines is prefered, then that's something that
> can easily be done later.
I tend to agree with Christoph on this - this level of internal API
churn is unnecessary and can be error prone (as you cunningly showed ;)
- please just leave it as is, and move on to greener pastures.
thanks.
--
Nathan
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] rename locking functions - fix a blunder in initial patches
2005-08-18 23:02 ` Nathan Scott
@ 2005-08-18 23:06 ` Jesper Juhl
0 siblings, 0 replies; 3+ messages in thread
From: Jesper Juhl @ 2005-08-18 23:06 UTC (permalink / raw)
To: Nathan Scott; +Cc: Andrew Morton, linux-kernel
On 8/19/05, Nathan Scott <nathans@sgi.com> wrote:
> On Thu, Aug 18, 2005 at 11:09:33PM +0200, Jesper Juhl wrote:
> > ...
> > have if getting rid of the defines is prefered, then that's something that
> > can easily be done later.
>
> I tend to agree with Christoph on this - this level of internal API
> churn is unnecessary and can be error prone (as you cunningly showed ;)
> - please just leave it as is, and move on to greener pastures.
>
If that's the general oppinion, then sure, I'll leave it alone. Just
thought it would be nice to make things more consistently named.
I'll leave it in the capable hands of akpm and not press the issue any further.
--
Jesper Juhl <jesper.juhl@gmail.com>
Don't top-post http://www.catb.org/~esr/jargon/html/T/top-post.html
Plain text mails only, please http://www.expita.com/nomime.html
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2005-08-18 23:06 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-08-18 21:09 [PATCH] rename locking functions - fix a blunder in initial patches Jesper Juhl
2005-08-18 23:02 ` Nathan Scott
2005-08-18 23:06 ` Jesper Juhl
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox