[Ocfs2-commits] manish commits r1477 - trunk/src
svn-commits at oss.oracle.com
svn-commits at oss.oracle.com
Mon Sep 20 14:22:07 CDT 2004
Author: manish
Date: 2004-09-20 14:22:06 -0500 (Mon, 20 Sep 2004)
New Revision: 1477
Modified:
trunk/src/dlm.c
Log:
Move definition of ocfs_wait_for_readonly_drop to where it actually can be
inlined. Delete unused label "unlock"
Modified: trunk/src/dlm.c
===================================================================
--- trunk/src/dlm.c 2004-09-20 19:07:36 UTC (rev 1476)
+++ trunk/src/dlm.c 2004-09-20 19:22:06 UTC (rev 1477)
@@ -54,8 +54,18 @@
/* Tracing */
#define OCFS_DEBUG_CONTEXT OCFS_DEBUG_CONTEXT_DLM
-static inline int ocfs_wait_for_readonly_drop(ocfs_super *osb, struct inode *inode);
+/* inode is definitely non NULL */
+static inline int ocfs_wait_for_readonly_drop(ocfs_super *osb, struct inode *inode)
+{
+ int status = 0;
+ ocfs_lock_res *lockres = GET_INODE_LOCKRES(inode);
+ if (ocfs_node_map_is_empty(&lockres->readonly_map))
+ return status;
+ status = ocfs_drop_readonly_cache_lock(osb, inode, 0);
+ return status;
+}
+
/*
* ocfs_update_disk_lock()
* inode is definitely non NULL
@@ -542,7 +552,6 @@
lockres->lock_holders -= num_ident;
LOG_TRACE_ARGS("lockres->lock_holders = %u\n", lockres->lock_holders);
-unlock:
ocfs_release_lockres_write (inode);
LOG_EXIT_STATUS (status);
return (status);
@@ -698,18 +707,6 @@
return status;
}
-/* inode is definitely non NULL */
-static inline int ocfs_wait_for_readonly_drop(ocfs_super *osb, struct inode *inode)
-{
- int status = 0;
- ocfs_lock_res *lockres = GET_INODE_LOCKRES(inode);
-
- if (ocfs_node_map_is_empty(&lockres->readonly_map))
- return status;
- status = ocfs_drop_readonly_cache_lock(osb, inode, 0);
- return status;
-}
-
void ocfs_compute_dlm_stats(int status, int vote_status, ocfs_dlm_stats *stats)
{
atomic_inc (&stats->total);
More information about the Ocfs2-commits
mailing list