aboutsummaryrefslogtreecommitdiffstats
path: root/fs/dlm
diff options
context:
space:
mode:
Diffstat (limited to 'fs/dlm')
-rw-r--r--fs/dlm/debug_fs.c14
-rw-r--r--fs/dlm/device.c6
-rw-r--r--fs/dlm/dlm_internal.h12
-rw-r--r--fs/dlm/lock.c103
-rw-r--r--fs/dlm/memory.c16
-rw-r--r--fs/dlm/memory.h2
-rw-r--r--fs/dlm/rcom.c3
-rw-r--r--fs/dlm/util.c12
8 files changed, 11 insertions, 157 deletions
diff --git a/fs/dlm/debug_fs.c b/fs/dlm/debug_fs.c
index 5080bbffd586..49deca845dba 100644
--- a/fs/dlm/debug_fs.c
+++ b/fs/dlm/debug_fs.c
@@ -59,20 +59,6 @@ static void print_lock(struct seq_file *s, struct dlm_lkb *lkb,
59 || lkb->lkb_status == DLM_LKSTS_WAITING) 59 || lkb->lkb_status == DLM_LKSTS_WAITING)
60 seq_printf(s, " (%s)", print_lockmode(lkb->lkb_rqmode)); 60 seq_printf(s, " (%s)", print_lockmode(lkb->lkb_rqmode));
61 61
62 if (lkb->lkb_range) {
63 /* FIXME: this warns on Alpha */
64 if (lkb->lkb_status == DLM_LKSTS_CONVERT
65 || lkb->lkb_status == DLM_LKSTS_GRANTED)
66 seq_printf(s, " %llx-%llx",
67 lkb->lkb_range[GR_RANGE_START],
68 lkb->lkb_range[GR_RANGE_END]);
69 if (lkb->lkb_status == DLM_LKSTS_CONVERT
70 || lkb->lkb_status == DLM_LKSTS_WAITING)
71 seq_printf(s, " (%llx-%llx)",
72 lkb->lkb_range[RQ_RANGE_START],
73 lkb->lkb_range[RQ_RANGE_END]);
74 }
75
76 if (lkb->lkb_nodeid) { 62 if (lkb->lkb_nodeid) {
77 if (lkb->lkb_nodeid != res->res_nodeid) 63 if (lkb->lkb_nodeid != res->res_nodeid)
78 seq_printf(s, " Remote: %3d %08x", lkb->lkb_nodeid, 64 seq_printf(s, " Remote: %3d %08x", lkb->lkb_nodeid,
diff --git a/fs/dlm/device.c b/fs/dlm/device.c
index 899d4f92a4d7..99d8b6b07fba 100644
--- a/fs/dlm/device.c
+++ b/fs/dlm/device.c
@@ -532,8 +532,7 @@ static int dlm_close(struct inode *inode, struct file *file)
532 status = dlm_lock(f->fi_ls->ls_lockspace, 532 status = dlm_lock(f->fi_ls->ls_lockspace,
533 old_li->li_grmode, &li.li_lksb, 533 old_li->li_grmode, &li.li_lksb,
534 DLM_LKF_CONVERT|DLM_LKF_ORPHAN, 534 DLM_LKF_CONVERT|DLM_LKF_ORPHAN,
535 NULL, 0, 0, ast_routine, NULL, 535 NULL, 0, 0, ast_routine, NULL, NULL);
536 NULL, NULL);
537 if (status != 0) 536 if (status != 0)
538 printk("dlm: Error orphaning lock %x: %d\n", 537 printk("dlm: Error orphaning lock %x: %d\n",
539 old_li->li_lksb.sb_lkid, status); 538 old_li->li_lksb.sb_lkid, status);
@@ -878,8 +877,7 @@ static int do_user_lock(struct file_info *fi, uint8_t cmd,
878 ast_routine, 877 ast_routine,
879 li, 878 li,
880 (li->li_pend_bastaddr || li->li_bastaddr) ? 879 (li->li_pend_bastaddr || li->li_bastaddr) ?
881 bast_routine : NULL, 880 bast_routine : NULL);
882 kparams->range.ra_end ? &kparams->range : NULL);
883 if (status) 881 if (status)
884 goto out_err; 882 goto out_err;
885 883
diff --git a/fs/dlm/dlm_internal.h b/fs/dlm/dlm_internal.h
index 16f20cfd9197..c3299020c8f3 100644
--- a/fs/dlm/dlm_internal.h
+++ b/fs/dlm/dlm_internal.h
@@ -146,7 +146,6 @@ struct dlm_args {
146 void *bastaddr; 146 void *bastaddr;
147 int mode; 147 int mode;
148 struct dlm_lksb *lksb; 148 struct dlm_lksb *lksb;
149 struct dlm_range *range;
150}; 149};
151 150
152 151
@@ -195,13 +194,6 @@ struct dlm_args {
195#define AST_COMP 1 194#define AST_COMP 1
196#define AST_BAST 2 195#define AST_BAST 2
197 196
198/* lkb_range[] */
199
200#define GR_RANGE_START 0
201#define GR_RANGE_END 1
202#define RQ_RANGE_START 2
203#define RQ_RANGE_END 3
204
205/* lkb_status */ 197/* lkb_status */
206 198
207#define DLM_LKSTS_WAITING 1 199#define DLM_LKSTS_WAITING 1
@@ -212,7 +204,6 @@ struct dlm_args {
212 204
213#define DLM_IFL_MSTCPY 0x00010000 205#define DLM_IFL_MSTCPY 0x00010000
214#define DLM_IFL_RESEND 0x00020000 206#define DLM_IFL_RESEND 0x00020000
215#define DLM_IFL_RANGE 0x00000001
216 207
217struct dlm_lkb { 208struct dlm_lkb {
218 struct dlm_rsb *lkb_resource; /* the rsb */ 209 struct dlm_rsb *lkb_resource; /* the rsb */
@@ -241,7 +232,6 @@ struct dlm_lkb {
241 struct list_head lkb_wait_reply; /* waiting for remote reply */ 232 struct list_head lkb_wait_reply; /* waiting for remote reply */
242 struct list_head lkb_astqueue; /* need ast to be sent */ 233 struct list_head lkb_astqueue; /* need ast to be sent */
243 234
244 uint64_t *lkb_range; /* array of gr/rq ranges */
245 char *lkb_lvbptr; 235 char *lkb_lvbptr;
246 struct dlm_lksb *lkb_lksb; /* caller's status block */ 236 struct dlm_lksb *lkb_lksb; /* caller's status block */
247 void *lkb_astaddr; /* caller's ast function */ 237 void *lkb_astaddr; /* caller's ast function */
@@ -360,7 +350,6 @@ struct dlm_message {
360 int m_bastmode; 350 int m_bastmode;
361 int m_asts; 351 int m_asts;
362 int m_result; /* 0 or -EXXX */ 352 int m_result; /* 0 or -EXXX */
363 uint64_t m_range[2];
364 char m_extra[0]; /* name or lvb */ 353 char m_extra[0]; /* name or lvb */
365}; 354};
366 355
@@ -413,7 +402,6 @@ struct rcom_lock {
413 int8_t rl_asts; 402 int8_t rl_asts;
414 uint16_t rl_wait_type; 403 uint16_t rl_wait_type;
415 uint16_t rl_namelen; 404 uint16_t rl_namelen;
416 uint64_t rl_range[4];
417 char rl_name[DLM_RESNAME_MAXLEN]; 405 char rl_name[DLM_RESNAME_MAXLEN];
418 char rl_lvb[0]; 406 char rl_lvb[0];
419}; 407};
diff --git a/fs/dlm/lock.c b/fs/dlm/lock.c
index 29d3b95dbb63..80487703d582 100644
--- a/fs/dlm/lock.c
+++ b/fs/dlm/lock.c
@@ -606,8 +606,6 @@ static int put_lkb(struct dlm_lkb *lkb)
606 /* for local/process lkbs, lvbptr points to caller's lksb */ 606 /* for local/process lkbs, lvbptr points to caller's lksb */
607 if (lkb->lkb_lvbptr && is_master_copy(lkb)) 607 if (lkb->lkb_lvbptr && is_master_copy(lkb))
608 free_lvb(lkb->lkb_lvbptr); 608 free_lvb(lkb->lkb_lvbptr);
609 if (lkb->lkb_range)
610 free_range(lkb->lkb_range);
611 free_lkb(lkb); 609 free_lkb(lkb);
612 return 1; 610 return 1;
613 } else { 611 } else {
@@ -988,11 +986,6 @@ static void _grant_lock(struct dlm_rsb *r, struct dlm_lkb *lkb)
988 } 986 }
989 987
990 lkb->lkb_rqmode = DLM_LOCK_IV; 988 lkb->lkb_rqmode = DLM_LOCK_IV;
991
992 if (lkb->lkb_range) {
993 lkb->lkb_range[GR_RANGE_START] = lkb->lkb_range[RQ_RANGE_START];
994 lkb->lkb_range[GR_RANGE_END] = lkb->lkb_range[RQ_RANGE_END];
995 }
996} 989}
997 990
998static void grant_lock(struct dlm_rsb *r, struct dlm_lkb *lkb) 991static void grant_lock(struct dlm_rsb *r, struct dlm_lkb *lkb)
@@ -1032,21 +1025,6 @@ static inline int first_in_list(struct dlm_lkb *lkb, struct list_head *head)
1032 return 0; 1025 return 0;
1033} 1026}
1034 1027
1035/* Return 1 if the locks' ranges overlap. If the lkb has no range then it is
1036 assumed to cover 0-ffffffff.ffffffff */
1037
1038static inline int ranges_overlap(struct dlm_lkb *lkb1, struct dlm_lkb *lkb2)
1039{
1040 if (!lkb1->lkb_range || !lkb2->lkb_range)
1041 return 1;
1042
1043 if (lkb1->lkb_range[RQ_RANGE_END] < lkb2->lkb_range[GR_RANGE_START] ||
1044 lkb1->lkb_range[RQ_RANGE_START] > lkb2->lkb_range[GR_RANGE_END])
1045 return 0;
1046
1047 return 1;
1048}
1049
1050/* Check if the given lkb conflicts with another lkb on the queue. */ 1028/* Check if the given lkb conflicts with another lkb on the queue. */
1051 1029
1052static int queue_conflict(struct list_head *head, struct dlm_lkb *lkb) 1030static int queue_conflict(struct list_head *head, struct dlm_lkb *lkb)
@@ -1056,7 +1034,7 @@ static int queue_conflict(struct list_head *head, struct dlm_lkb *lkb)
1056 list_for_each_entry(this, head, lkb_statequeue) { 1034 list_for_each_entry(this, head, lkb_statequeue) {
1057 if (this == lkb) 1035 if (this == lkb)
1058 continue; 1036 continue;
1059 if (ranges_overlap(lkb, this) && !modes_compat(this, lkb)) 1037 if (!modes_compat(this, lkb))
1060 return 1; 1038 return 1;
1061 } 1039 }
1062 return 0; 1040 return 0;
@@ -1099,9 +1077,6 @@ static int conversion_deadlock_detect(struct dlm_rsb *rsb, struct dlm_lkb *lkb)
1099 continue; 1077 continue;
1100 } 1078 }
1101 1079
1102 if (!ranges_overlap(lkb, this))
1103 continue;
1104
1105 if (!modes_compat(this, lkb) && !modes_compat(lkb, this)) 1080 if (!modes_compat(this, lkb) && !modes_compat(lkb, this))
1106 return 1; 1081 return 1;
1107 } 1082 }
@@ -1203,8 +1178,8 @@ static int _can_be_granted(struct dlm_rsb *r, struct dlm_lkb *lkb, int now)
1203 return 1; 1178 return 1;
1204 1179
1205 /* 1180 /*
1206 * When using range locks the NOORDER flag is set to avoid the standard 1181 * The NOORDER flag is set to avoid the standard vms rules on grant
1207 * vms rules on grant order. 1182 * order.
1208 */ 1183 */
1209 1184
1210 if (lkb->lkb_exflags & DLM_LKF_NOORDER) 1185 if (lkb->lkb_exflags & DLM_LKF_NOORDER)
@@ -1358,8 +1333,7 @@ static void grant_pending_locks(struct dlm_rsb *r)
1358 /* 1333 /*
1359 * If there are locks left on the wait/convert queue then send blocking 1334 * If there are locks left on the wait/convert queue then send blocking
1360 * ASTs to granted locks based on the largest requested mode (high) 1335 * ASTs to granted locks based on the largest requested mode (high)
1361 * found above. This can generate spurious blocking ASTs for range 1336 * found above. FIXME: highbast < high comparison not valid for PR/CW.
1362 * locks. FIXME: highbast < high comparison not valid for PR/CW.
1363 */ 1337 */
1364 1338
1365 list_for_each_entry_safe(lkb, s, &r->res_grantqueue, lkb_statequeue) { 1339 list_for_each_entry_safe(lkb, s, &r->res_grantqueue, lkb_statequeue) {
@@ -1379,7 +1353,7 @@ static void send_bast_queue(struct dlm_rsb *r, struct list_head *head,
1379 list_for_each_entry(gr, head, lkb_statequeue) { 1353 list_for_each_entry(gr, head, lkb_statequeue) {
1380 if (gr->lkb_bastaddr && 1354 if (gr->lkb_bastaddr &&
1381 gr->lkb_highbast < lkb->lkb_rqmode && 1355 gr->lkb_highbast < lkb->lkb_rqmode &&
1382 ranges_overlap(lkb, gr) && !modes_compat(gr, lkb)) { 1356 !modes_compat(gr, lkb)) {
1383 queue_bast(r, gr, lkb->lkb_rqmode); 1357 queue_bast(r, gr, lkb->lkb_rqmode);
1384 gr->lkb_highbast = lkb->lkb_rqmode; 1358 gr->lkb_highbast = lkb->lkb_rqmode;
1385 } 1359 }
@@ -1530,8 +1504,7 @@ static void confirm_master(struct dlm_rsb *r, int error)
1530 1504
1531static int set_lock_args(int mode, struct dlm_lksb *lksb, uint32_t flags, 1505static int set_lock_args(int mode, struct dlm_lksb *lksb, uint32_t flags,
1532 int namelen, uint32_t parent_lkid, void *ast, 1506 int namelen, uint32_t parent_lkid, void *ast,
1533 void *astarg, void *bast, struct dlm_range *range, 1507 void *astarg, void *bast, struct dlm_args *args)
1534 struct dlm_args *args)
1535{ 1508{
1536 int rv = -EINVAL; 1509 int rv = -EINVAL;
1537 1510
@@ -1590,7 +1563,6 @@ static int set_lock_args(int mode, struct dlm_lksb *lksb, uint32_t flags,
1590 args->bastaddr = bast; 1563 args->bastaddr = bast;
1591 args->mode = mode; 1564 args->mode = mode;
1592 args->lksb = lksb; 1565 args->lksb = lksb;
1593 args->range = range;
1594 rv = 0; 1566 rv = 0;
1595 out: 1567 out:
1596 return rv; 1568 return rv;
@@ -1637,26 +1609,6 @@ static int validate_lock_args(struct dlm_ls *ls, struct dlm_lkb *lkb,
1637 lkb->lkb_lksb = args->lksb; 1609 lkb->lkb_lksb = args->lksb;
1638 lkb->lkb_lvbptr = args->lksb->sb_lvbptr; 1610 lkb->lkb_lvbptr = args->lksb->sb_lvbptr;
1639 lkb->lkb_ownpid = (int) current->pid; 1611 lkb->lkb_ownpid = (int) current->pid;
1640
1641 rv = 0;
1642 if (!args->range)
1643 goto out;
1644
1645 if (!lkb->lkb_range) {
1646 rv = -ENOMEM;
1647 lkb->lkb_range = allocate_range(ls);
1648 if (!lkb->lkb_range)
1649 goto out;
1650 /* This is needed for conversions that contain ranges
1651 where the original lock didn't but it's harmless for
1652 new locks too. */
1653 lkb->lkb_range[GR_RANGE_START] = 0LL;
1654 lkb->lkb_range[GR_RANGE_END] = 0xffffffffffffffffULL;
1655 }
1656
1657 lkb->lkb_range[RQ_RANGE_START] = args->range->ra_start;
1658 lkb->lkb_range[RQ_RANGE_END] = args->range->ra_end;
1659 lkb->lkb_flags |= DLM_IFL_RANGE;
1660 rv = 0; 1612 rv = 0;
1661 out: 1613 out:
1662 return rv; 1614 return rv;
@@ -1805,7 +1757,7 @@ static int _request_lock(struct dlm_rsb *r, struct dlm_lkb *lkb)
1805 return error; 1757 return error;
1806} 1758}
1807 1759
1808/* change some property of an existing lkb, e.g. mode, range */ 1760/* change some property of an existing lkb, e.g. mode */
1809 1761
1810static int _convert_lock(struct dlm_rsb *r, struct dlm_lkb *lkb) 1762static int _convert_lock(struct dlm_rsb *r, struct dlm_lkb *lkb)
1811{ 1763{
@@ -1962,8 +1914,7 @@ int dlm_lock(dlm_lockspace_t *lockspace,
1962 uint32_t parent_lkid, 1914 uint32_t parent_lkid,
1963 void (*ast) (void *astarg), 1915 void (*ast) (void *astarg),
1964 void *astarg, 1916 void *astarg,
1965 void (*bast) (void *astarg, int mode), 1917 void (*bast) (void *astarg, int mode))
1966 struct dlm_range *range)
1967{ 1918{
1968 struct dlm_ls *ls; 1919 struct dlm_ls *ls;
1969 struct dlm_lkb *lkb; 1920 struct dlm_lkb *lkb;
@@ -1985,7 +1936,7 @@ int dlm_lock(dlm_lockspace_t *lockspace,
1985 goto out; 1936 goto out;
1986 1937
1987 error = set_lock_args(mode, lksb, flags, namelen, parent_lkid, ast, 1938 error = set_lock_args(mode, lksb, flags, namelen, parent_lkid, ast,
1988 astarg, bast, range, &args); 1939 astarg, bast, &args);
1989 if (error) 1940 if (error)
1990 goto out_put; 1941 goto out_put;
1991 1942
@@ -2154,11 +2105,6 @@ static void send_args(struct dlm_rsb *r, struct dlm_lkb *lkb,
2154 if (lkb->lkb_astaddr) 2105 if (lkb->lkb_astaddr)
2155 ms->m_asts |= AST_COMP; 2106 ms->m_asts |= AST_COMP;
2156 2107
2157 if (lkb->lkb_range) {
2158 ms->m_range[0] = lkb->lkb_range[RQ_RANGE_START];
2159 ms->m_range[1] = lkb->lkb_range[RQ_RANGE_END];
2160 }
2161
2162 if (ms->m_type == DLM_MSG_REQUEST || ms->m_type == DLM_MSG_LOOKUP) 2108 if (ms->m_type == DLM_MSG_REQUEST || ms->m_type == DLM_MSG_LOOKUP)
2163 memcpy(ms->m_extra, r->res_name, r->res_length); 2109 memcpy(ms->m_extra, r->res_name, r->res_length);
2164 2110
@@ -2402,20 +2348,6 @@ static int receive_extralen(struct dlm_message *ms)
2402 return (ms->m_header.h_length - sizeof(struct dlm_message)); 2348 return (ms->m_header.h_length - sizeof(struct dlm_message));
2403} 2349}
2404 2350
2405static int receive_range(struct dlm_ls *ls, struct dlm_lkb *lkb,
2406 struct dlm_message *ms)
2407{
2408 if (lkb->lkb_flags & DLM_IFL_RANGE) {
2409 if (!lkb->lkb_range)
2410 lkb->lkb_range = allocate_range(ls);
2411 if (!lkb->lkb_range)
2412 return -ENOMEM;
2413 lkb->lkb_range[RQ_RANGE_START] = ms->m_range[0];
2414 lkb->lkb_range[RQ_RANGE_END] = ms->m_range[1];
2415 }
2416 return 0;
2417}
2418
2419static int receive_lvb(struct dlm_ls *ls, struct dlm_lkb *lkb, 2351static int receive_lvb(struct dlm_ls *ls, struct dlm_lkb *lkb,
2420 struct dlm_message *ms) 2352 struct dlm_message *ms)
2421{ 2353{
@@ -2445,9 +2377,6 @@ static int receive_request_args(struct dlm_ls *ls, struct dlm_lkb *lkb,
2445 2377
2446 DLM_ASSERT(is_master_copy(lkb), dlm_print_lkb(lkb);); 2378 DLM_ASSERT(is_master_copy(lkb), dlm_print_lkb(lkb););
2447 2379
2448 if (receive_range(ls, lkb, ms))
2449 return -ENOMEM;
2450
2451 if (receive_lvb(ls, lkb, ms)) 2380 if (receive_lvb(ls, lkb, ms))
2452 return -ENOMEM; 2381 return -ENOMEM;
2453 2382
@@ -2470,13 +2399,6 @@ static int receive_convert_args(struct dlm_ls *ls, struct dlm_lkb *lkb,
2470 if (lkb->lkb_status != DLM_LKSTS_GRANTED) 2399 if (lkb->lkb_status != DLM_LKSTS_GRANTED)
2471 return -EBUSY; 2400 return -EBUSY;
2472 2401
2473 if (receive_range(ls, lkb, ms))
2474 return -ENOMEM;
2475 if (lkb->lkb_range) {
2476 lkb->lkb_range[GR_RANGE_START] = 0LL;
2477 lkb->lkb_range[GR_RANGE_END] = 0xffffffffffffffffULL;
2478 }
2479
2480 if (receive_lvb(ls, lkb, ms)) 2402 if (receive_lvb(ls, lkb, ms))
2481 return -ENOMEM; 2403 return -ENOMEM;
2482 2404
@@ -3476,13 +3398,6 @@ static int receive_rcom_lock_args(struct dlm_ls *ls, struct dlm_lkb *lkb,
3476 lkb->lkb_bastaddr = (void *) (long) (rl->rl_asts & AST_BAST); 3398 lkb->lkb_bastaddr = (void *) (long) (rl->rl_asts & AST_BAST);
3477 lkb->lkb_astaddr = (void *) (long) (rl->rl_asts & AST_COMP); 3399 lkb->lkb_astaddr = (void *) (long) (rl->rl_asts & AST_COMP);
3478 3400
3479 if (lkb->lkb_flags & DLM_IFL_RANGE) {
3480 lkb->lkb_range = allocate_range(ls);
3481 if (!lkb->lkb_range)
3482 return -ENOMEM;
3483 memcpy(lkb->lkb_range, rl->rl_range, 4*sizeof(uint64_t));
3484 }
3485
3486 if (lkb->lkb_exflags & DLM_LKF_VALBLK) { 3401 if (lkb->lkb_exflags & DLM_LKF_VALBLK) {
3487 lkb->lkb_lvbptr = allocate_lvb(ls); 3402 lkb->lkb_lvbptr = allocate_lvb(ls);
3488 if (!lkb->lkb_lvbptr) 3403 if (!lkb->lkb_lvbptr)
diff --git a/fs/dlm/memory.c b/fs/dlm/memory.c
index 0b9851d0bdb2..f7cf4589fae8 100644
--- a/fs/dlm/memory.c
+++ b/fs/dlm/memory.c
@@ -50,22 +50,6 @@ void free_lvb(char *p)
50 kfree(p); 50 kfree(p);
51} 51}
52 52
53uint64_t *allocate_range(struct dlm_ls *ls)
54{
55 int ralen = 4*sizeof(uint64_t);
56 uint64_t *p;
57
58 p = kmalloc(ralen, GFP_KERNEL);
59 if (p)
60 memset(p, 0, ralen);
61 return p;
62}
63
64void free_range(uint64_t *p)
65{
66 kfree(p);
67}
68
69/* FIXME: have some minimal space built-in to rsb for the name and 53/* FIXME: have some minimal space built-in to rsb for the name and
70 kmalloc a separate name if needed, like dentries are done */ 54 kmalloc a separate name if needed, like dentries are done */
71 55
diff --git a/fs/dlm/memory.h b/fs/dlm/memory.h
index 7b235132b0b4..6ead158ccc5c 100644
--- a/fs/dlm/memory.h
+++ b/fs/dlm/memory.h
@@ -24,8 +24,6 @@ struct dlm_direntry *allocate_direntry(struct dlm_ls *ls, int namelen);
24void free_direntry(struct dlm_direntry *de); 24void free_direntry(struct dlm_direntry *de);
25char *allocate_lvb(struct dlm_ls *ls); 25char *allocate_lvb(struct dlm_ls *ls);
26void free_lvb(char *l); 26void free_lvb(char *l);
27uint64_t *allocate_range(struct dlm_ls *ls);
28void free_range(uint64_t *l);
29 27
30#endif /* __MEMORY_DOT_H__ */ 28#endif /* __MEMORY_DOT_H__ */
31 29
diff --git a/fs/dlm/rcom.c b/fs/dlm/rcom.c
index 4c5c08a8860e..55fbe313340e 100644
--- a/fs/dlm/rcom.c
+++ b/fs/dlm/rcom.c
@@ -284,9 +284,6 @@ static void pack_rcom_lock(struct dlm_rsb *r, struct dlm_lkb *lkb,
284 if (lkb->lkb_astaddr) 284 if (lkb->lkb_astaddr)
285 rl->rl_asts |= AST_COMP; 285 rl->rl_asts |= AST_COMP;
286 286
287 if (lkb->lkb_range)
288 memcpy(rl->rl_range, lkb->lkb_range, 4*sizeof(uint64_t));
289
290 rl->rl_namelen = r->res_length; 287 rl->rl_namelen = r->res_length;
291 memcpy(rl->rl_name, r->res_name, r->res_length); 288 memcpy(rl->rl_name, r->res_name, r->res_length);
292 289
diff --git a/fs/dlm/util.c b/fs/dlm/util.c
index 826d122edf55..767197db9944 100644
--- a/fs/dlm/util.c
+++ b/fs/dlm/util.c
@@ -54,8 +54,6 @@ void dlm_message_out(struct dlm_message *ms)
54 ms->m_bastmode = cpu_to_le32(ms->m_bastmode); 54 ms->m_bastmode = cpu_to_le32(ms->m_bastmode);
55 ms->m_asts = cpu_to_le32(ms->m_asts); 55 ms->m_asts = cpu_to_le32(ms->m_asts);
56 ms->m_result = cpu_to_le32(ms->m_result); 56 ms->m_result = cpu_to_le32(ms->m_result);
57 ms->m_range[0] = cpu_to_le64(ms->m_range[0]);
58 ms->m_range[1] = cpu_to_le64(ms->m_range[1]);
59} 57}
60 58
61void dlm_message_in(struct dlm_message *ms) 59void dlm_message_in(struct dlm_message *ms)
@@ -82,8 +80,6 @@ void dlm_message_in(struct dlm_message *ms)
82 ms->m_bastmode = le32_to_cpu(ms->m_bastmode); 80 ms->m_bastmode = le32_to_cpu(ms->m_bastmode);
83 ms->m_asts = le32_to_cpu(ms->m_asts); 81 ms->m_asts = le32_to_cpu(ms->m_asts);
84 ms->m_result = le32_to_cpu(ms->m_result); 82 ms->m_result = le32_to_cpu(ms->m_result);
85 ms->m_range[0] = le64_to_cpu(ms->m_range[0]);
86 ms->m_range[1] = le64_to_cpu(ms->m_range[1]);
87} 83}
88 84
89static void rcom_lock_out(struct rcom_lock *rl) 85static void rcom_lock_out(struct rcom_lock *rl)
@@ -99,10 +95,6 @@ static void rcom_lock_out(struct rcom_lock *rl)
99 rl->rl_result = cpu_to_le32(rl->rl_result); 95 rl->rl_result = cpu_to_le32(rl->rl_result);
100 rl->rl_wait_type = cpu_to_le16(rl->rl_wait_type); 96 rl->rl_wait_type = cpu_to_le16(rl->rl_wait_type);
101 rl->rl_namelen = cpu_to_le16(rl->rl_namelen); 97 rl->rl_namelen = cpu_to_le16(rl->rl_namelen);
102 rl->rl_range[0] = cpu_to_le64(rl->rl_range[0]);
103 rl->rl_range[1] = cpu_to_le64(rl->rl_range[1]);
104 rl->rl_range[2] = cpu_to_le64(rl->rl_range[2]);
105 rl->rl_range[3] = cpu_to_le64(rl->rl_range[3]);
106} 98}
107 99
108static void rcom_lock_in(struct rcom_lock *rl) 100static void rcom_lock_in(struct rcom_lock *rl)
@@ -118,10 +110,6 @@ static void rcom_lock_in(struct rcom_lock *rl)
118 rl->rl_result = le32_to_cpu(rl->rl_result); 110 rl->rl_result = le32_to_cpu(rl->rl_result);
119 rl->rl_wait_type = le16_to_cpu(rl->rl_wait_type); 111 rl->rl_wait_type = le16_to_cpu(rl->rl_wait_type);
120 rl->rl_namelen = le16_to_cpu(rl->rl_namelen); 112 rl->rl_namelen = le16_to_cpu(rl->rl_namelen);
121 rl->rl_range[0] = le64_to_cpu(rl->rl_range[0]);
122 rl->rl_range[1] = le64_to_cpu(rl->rl_range[1]);
123 rl->rl_range[2] = le64_to_cpu(rl->rl_range[2]);
124 rl->rl_range[3] = le64_to_cpu(rl->rl_range[3]);
125} 113}
126 114
127static void rcom_config_out(struct rcom_config *rf) 115static void rcom_config_out(struct rcom_config *rf)