Commit a1d0fc77 authored by Nathan Scott's avatar Nathan Scott

[XFS] Fix up mrlock debug code, and ensure its only built under DEBUG.

SGI Modid: xfs-linux:xfs-kern:167944a
parent 96531b37
......@@ -88,6 +88,7 @@ static inline void mrdemote(mrlock_t *mrp)
downgrade_write(&mrp->mr_lock);
}
#ifdef DEBUG
/*
* Debug-only routine, without some platform-specific asm code, we can
* now only answer requests regarding whether we hold the lock for write
......@@ -96,9 +97,10 @@ static inline void mrdemote(mrlock_t *mrp)
*/
static inline int ismrlocked(mrlock_t *mrp, int type)
{
if (type == MR_UPDATE)
if (mrp && type == MR_UPDATE)
return mrp->mr_writer;
return 1;
}
#endif
#endif /* __XFS_SUPPORT_MRLOCK_H__ */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment