aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteven Whitehouse <swhiteho@redhat.com>2008-06-03 09:34:14 -0400
committerSteven Whitehouse <swhiteho@redhat.com>2008-06-27 04:39:47 -0400
commitb2cad26cfc2091050574a460b304ed103a35dbda (patch)
tree3238ab4b7406836e98d27de5c70dc8419675a914
parent1bdad606338debc6384b2844f1b53cc436b3ac90 (diff)
[GFS2] Remove obsolete conversion deadlock avoidance code
This is only used by GFS1 so can be removed. Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
-rw-r--r--fs/gfs2/locking/dlm/lock.c23
-rw-r--r--include/linux/lm_interface.h2
2 files changed, 1 insertions, 24 deletions
diff --git a/fs/gfs2/locking/dlm/lock.c b/fs/gfs2/locking/dlm/lock.c
index 871ffc9578f2..894df4567a03 100644
--- a/fs/gfs2/locking/dlm/lock.c
+++ b/fs/gfs2/locking/dlm/lock.c
@@ -80,7 +80,6 @@ static void process_complete(struct gdlm_lock *lp)
80{ 80{
81 struct gdlm_ls *ls = lp->ls; 81 struct gdlm_ls *ls = lp->ls;
82 struct lm_async_cb acb; 82 struct lm_async_cb acb;
83 s16 prev_mode = lp->cur;
84 83
85 memset(&acb, 0, sizeof(acb)); 84 memset(&acb, 0, sizeof(acb));
86 85
@@ -160,15 +159,7 @@ static void process_complete(struct gdlm_lock *lp)
160 lp->lksb.sb_status, lp->lockname.ln_type, 159 lp->lksb.sb_status, lp->lockname.ln_type,
161 (unsigned long long)lp->lockname.ln_number, 160 (unsigned long long)lp->lockname.ln_number,
162 lp->flags); 161 lp->flags);
163 if (lp->lksb.sb_status == -EDEADLOCK && 162 return;
164 lp->ls->fsflags & LM_MFLAG_CONV_NODROP) {
165 lp->req = lp->cur;
166 acb.lc_ret |= LM_OUT_CONV_DEADLK;
167 if (lp->cur == DLM_LOCK_IV)
168 lp->lksb.sb_lkid = 0;
169 goto out;
170 } else
171 return;
172 } 163 }
173 164
174 /* 165 /*
@@ -268,10 +259,6 @@ out:
268 acb.lc_name = lp->lockname; 259 acb.lc_name = lp->lockname;
269 acb.lc_ret |= gdlm_make_lmstate(lp->cur); 260 acb.lc_ret |= gdlm_make_lmstate(lp->cur);
270 261
271 if (!test_and_clear_bit(LFL_NOCACHE, &lp->flags) &&
272 (lp->cur > DLM_LOCK_NL) && (prev_mode > DLM_LOCK_NL))
273 acb.lc_ret |= LM_OUT_CACHEABLE;
274
275 ls->fscb(ls->sdp, LM_CB_ASYNC, &acb); 262 ls->fscb(ls->sdp, LM_CB_ASYNC, &acb);
276} 263}
277 264
@@ -376,14 +363,6 @@ static inline unsigned int make_flags(struct gdlm_lock *lp,
376 363
377 if (lp->lksb.sb_lkid != 0) { 364 if (lp->lksb.sb_lkid != 0) {
378 lkf |= DLM_LKF_CONVERT; 365 lkf |= DLM_LKF_CONVERT;
379
380 /* Conversion deadlock avoidance by DLM */
381
382 if (!(lp->ls->fsflags & LM_MFLAG_CONV_NODROP) &&
383 !test_bit(LFL_FORCE_PROMOTE, &lp->flags) &&
384 !(lkf & DLM_LKF_NOQUEUE) &&
385 cur > DLM_LOCK_NL && req > DLM_LOCK_NL && cur != req)
386 lkf |= DLM_LKF_CONVDEADLK;
387 } 366 }
388 367
389 if (lp->lvb) 368 if (lp->lvb)
diff --git a/include/linux/lm_interface.h b/include/linux/lm_interface.h
index d0a7112b9719..2ed8fa1b762b 100644
--- a/include/linux/lm_interface.h
+++ b/include/linux/lm_interface.h
@@ -122,11 +122,9 @@ typedef void (*lm_callback_t) (void *ptr, unsigned int type, void *data);
122 */ 122 */
123 123
124#define LM_OUT_ST_MASK 0x00000003 124#define LM_OUT_ST_MASK 0x00000003
125#define LM_OUT_CACHEABLE 0x00000004
126#define LM_OUT_CANCELED 0x00000008 125#define LM_OUT_CANCELED 0x00000008
127#define LM_OUT_ASYNC 0x00000080 126#define LM_OUT_ASYNC 0x00000080
128#define LM_OUT_ERROR 0x00000100 127#define LM_OUT_ERROR 0x00000100
129#define LM_OUT_CONV_DEADLK 0x00000200
130 128
131/* 129/*
132 * lm_callback_t types 130 * lm_callback_t types