]> err.no Git - linux-2.6/commitdiff
[GFS2] Remove obsolete conversion deadlock avoidance code
authorSteven Whitehouse <swhiteho@redhat.com>
Tue, 3 Jun 2008 13:34:14 +0000 (14:34 +0100)
committerSteven Whitehouse <swhiteho@redhat.com>
Fri, 27 Jun 2008 08:39:47 +0000 (09:39 +0100)
This is only used by GFS1 so can be removed.

Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
fs/gfs2/locking/dlm/lock.c
include/linux/lm_interface.h

index 871ffc9578f2a8549954ed802e05ae4a3e6a8d7c..894df4567a030adafb5bc43cadbcb73c82d7f5da 100644 (file)
@@ -80,7 +80,6 @@ static void process_complete(struct gdlm_lock *lp)
 {
        struct gdlm_ls *ls = lp->ls;
        struct lm_async_cb acb;
-       s16 prev_mode = lp->cur;
 
        memset(&acb, 0, sizeof(acb));
 
@@ -160,15 +159,7 @@ static void process_complete(struct gdlm_lock *lp)
                         lp->lksb.sb_status, lp->lockname.ln_type,
                         (unsigned long long)lp->lockname.ln_number,
                         lp->flags);
-               if (lp->lksb.sb_status == -EDEADLOCK &&
-                   lp->ls->fsflags & LM_MFLAG_CONV_NODROP) {
-                       lp->req = lp->cur;
-                       acb.lc_ret |= LM_OUT_CONV_DEADLK;
-                       if (lp->cur == DLM_LOCK_IV)
-                               lp->lksb.sb_lkid = 0;
-                       goto out;
-               } else
-                       return;
+               return;
        }
 
        /*
@@ -268,10 +259,6 @@ out:
        acb.lc_name = lp->lockname;
        acb.lc_ret |= gdlm_make_lmstate(lp->cur);
 
-       if (!test_and_clear_bit(LFL_NOCACHE, &lp->flags) &&
-           (lp->cur > DLM_LOCK_NL) && (prev_mode > DLM_LOCK_NL))
-               acb.lc_ret |= LM_OUT_CACHEABLE;
-
        ls->fscb(ls->sdp, LM_CB_ASYNC, &acb);
 }
 
@@ -376,14 +363,6 @@ static inline unsigned int make_flags(struct gdlm_lock *lp,
 
        if (lp->lksb.sb_lkid != 0) {
                lkf |= DLM_LKF_CONVERT;
-
-               /* Conversion deadlock avoidance by DLM */
-
-               if (!(lp->ls->fsflags & LM_MFLAG_CONV_NODROP) &&
-                   !test_bit(LFL_FORCE_PROMOTE, &lp->flags) &&
-                   !(lkf & DLM_LKF_NOQUEUE) &&
-                   cur > DLM_LOCK_NL && req > DLM_LOCK_NL && cur != req)
-                       lkf |= DLM_LKF_CONVDEADLK;
        }
 
        if (lp->lvb)
index d0a7112b9719ed2b5c25f85b135a7d11caa653e4..2ed8fa1b762ba6e5b36b4cf1118c256ac0c9d318 100644 (file)
@@ -122,11 +122,9 @@ typedef void (*lm_callback_t) (void *ptr, unsigned int type, void *data);
  */
 
 #define LM_OUT_ST_MASK         0x00000003
-#define LM_OUT_CACHEABLE       0x00000004
 #define LM_OUT_CANCELED                0x00000008
 #define LM_OUT_ASYNC           0x00000080
 #define LM_OUT_ERROR           0x00000100
-#define LM_OUT_CONV_DEADLK     0x00000200
 
 /*
  * lm_callback_t types