* Nathan Scott <nathans@xxxxxxx> wrote: > > fs/xfs/xfs_mount.h:#define AIL_LOCK_DESTROY(x) spinlock_destroy(x) > > fs/xfs/linux-2.6/spin.h:#define spinlock_destroy(lock) > > > > needs to change and we need to implement spinlock_destroy(), a'ka > > mutex_destroy()? [which i added recently too] > > Hmm, don't think so - only if you needed to change all other spinlock > uses in the kernel to have a teardown too? Can't see that in current > git trees, anyway, so I expect that to be OK as is. i should have formulated this as a question: should i implement spin_lock_destroy()? A few months ago i implemented mutex_destroy() for XFS's use, and now we could do it for spinlocks too. Right now the only upstream requirement wrt. spinlock disposal is that it should not be in locked state when it's destroyed. (PREEMPT_RT in the -rt tree needed that semantic detail too and there were a handful of places in the kernel that freed held locks - we fixed those up in the past year or so.) spin_lock_destroy() would work like mutex_destroy(): the magic number in the lock is overwritten and hence no further locking API will allow the use of that lock from that point on. (up until the lock is reinitialized via spin_lock_init()) Ingo - To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html