aboutsummaryrefslogtreecommitdiffstats
path: root/fs/gfs2/glock.h
diff options
context:
space:
mode:
authorSteven Whitehouse <swhiteho@redhat.com>2010-11-29 07:50:38 -0500
committerSteven Whitehouse <swhiteho@redhat.com>2010-11-30 05:31:48 -0500
commit921169ca2f7c8a0a2ccda2ce33c465dfe3ae30ef (patch)
treef40f00721426eb992d75493defefb8de8a71b7e1 /fs/gfs2/glock.h
parent802ec9b6682349d9d9c92a9e55f44324d2954f41 (diff)
GFS2: Clean up of gdlm_lock function
The DLM never returns -EAGAIN in response to dlm_lock(), and even if it did, the test in gdlm_lock() was wrong anyway. Once that test is removed, it is possible to greatly simplify this code by simply using a "normal" error return code (0 for success). We then no longer need the LM_OUT_ASYNC return code which can be removed. Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Diffstat (limited to 'fs/gfs2/glock.h')
-rw-r--r--fs/gfs2/glock.h12
1 files changed, 4 insertions, 8 deletions
diff --git a/fs/gfs2/glock.h b/fs/gfs2/glock.h
index a12d11767752..ba6865c6e7e0 100644
--- a/fs/gfs2/glock.h
+++ b/fs/gfs2/glock.h
@@ -91,7 +91,7 @@ enum {
91#define GL_NOCACHE 0x00000400 91#define GL_NOCACHE 0x00000400
92 92
93/* 93/*
94 * lm_lock() and lm_async_cb return flags 94 * lm_async_cb return flags
95 * 95 *
96 * LM_OUT_ST_MASK 96 * LM_OUT_ST_MASK
97 * Masks the lower two bits of lock state in the returned value. 97 * Masks the lower two bits of lock state in the returned value.
@@ -99,15 +99,11 @@ enum {
99 * LM_OUT_CANCELED 99 * LM_OUT_CANCELED
100 * The lock request was canceled. 100 * The lock request was canceled.
101 * 101 *
102 * LM_OUT_ASYNC
103 * The result of the request will be returned in an LM_CB_ASYNC callback.
104 *
105 */ 102 */
106 103
107#define LM_OUT_ST_MASK 0x00000003 104#define LM_OUT_ST_MASK 0x00000003
108#define LM_OUT_CANCELED 0x00000008 105#define LM_OUT_CANCELED 0x00000008
109#define LM_OUT_ASYNC 0x00000080 106#define LM_OUT_ERROR 0x00000004
110#define LM_OUT_ERROR 0x00000100
111 107
112/* 108/*
113 * lm_recovery_done() messages 109 * lm_recovery_done() messages
@@ -124,8 +120,8 @@ struct lm_lockops {
124 void (*lm_unmount) (struct gfs2_sbd *sdp); 120 void (*lm_unmount) (struct gfs2_sbd *sdp);
125 void (*lm_withdraw) (struct gfs2_sbd *sdp); 121 void (*lm_withdraw) (struct gfs2_sbd *sdp);
126 void (*lm_put_lock) (struct kmem_cache *cachep, struct gfs2_glock *gl); 122 void (*lm_put_lock) (struct kmem_cache *cachep, struct gfs2_glock *gl);
127 unsigned int (*lm_lock) (struct gfs2_glock *gl, 123 int (*lm_lock) (struct gfs2_glock *gl, unsigned int req_state,
128 unsigned int req_state, unsigned int flags); 124 unsigned int flags);
129 void (*lm_cancel) (struct gfs2_glock *gl); 125 void (*lm_cancel) (struct gfs2_glock *gl);
130 const match_table_t *lm_tokens; 126 const match_table_t *lm_tokens;
131}; 127};