Re: [patch 9/9] mutex subsystem, XFS namespace collision fixes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



* Christoph Hellwig <[email protected]> wrote:

> > -#define mutex_init(lock, type, name)		sema_init(lock, 1)
> > -#define mutex_destroy(lock)			sema_init(lock, -99)
> > -#define mutex_lock(lock, num)			down(lock)
> > -#define mutex_trylock(lock)			(down_trylock(lock) ? 0 : 1)
> > -#define mutex_unlock(lock)			up(lock)
> > +#define xfs_mutex_init(lock, type, name)	sema_init(lock, 1)
> > +#define xfs_mutex_destroy(lock)			sema_init(lock, -99)
> > +#define xfs_mutex_lock(lock, num)		down(lock)
> > +#define xfs_mutex_trylock(lock)			(down_trylock(lock) ? 0 : 1)
> > +#define xfs_mutex_unlock(lock)			up(lock)
> 
> Again, this should really be using the mutex primitives (obviously 
> ;-)).

yeah - but i didnt want to impact something so large as XFS. Such a 
change has to be tested and validated - so i wanted to get the namespace 
collision out of the way first. But i'd be happy to add an XFS 
conversion patch ontop of these, provided someone tests it.

> While we're at it, maybe we should a mutex_destroy aswell?  it would 
> be non-mandatory and allow that a lock is gone for the debugging 
> variant.

right now the lock is gone from the debugging state once it's unlocked.  
I'll add mutex_destroy(), it should be rather easy (it can e.g. destroy 
mutex->magic).

	Ingo
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux