Skip to contentSkip to conversation

ocfs2: remove a useless statement

PATCH New Wengang Wang 2 participants 3 messages Mar 25, 2010 – Mar 26, 2010 OCFS2

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ocfs2: remove a useless statement

When we are downconvert a lock to NL from PR, we don't need access lvb. So we clear LKM_VALBLK from _flags_ in __dlmconvert_master(). While we don't check LKM_VALBLK on _flags_ any more and _flags_ is never passed to any other function. Thus the clearing statement is useless though harmless. For making code clean, I made this patch to remove the useless statement.

---
 fs/ocfs2/dlm/dlmconvert.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)
fs/ocfs2/dlm/dlmconvert.c +0 -1
index f283bce..44b40a8 100644
@@ -173,7 +173,6 @@ static enum dlm_status __dlmconvert_master(struct dlm_ctxt *dlm,
 					     "into lvb: converting %s->%s\n",
 					     dlm_lock_mode_name(lock->ml.type),
 					     dlm_lock_mode_name(type));
-					flags &= ~(LKM_VALBLK);
 				}
 				break;
 		}
Signature · 1 line
1.6.6.1
#1 lore raw

PATCH 1/1 ocfs2: remove a useless statement

nak

I would rather leave it there. We have that if block just for it. There must have been a reason for it being there.

Quoted 24 lines · Wengang Wang

When we are downconvert a lock to NL from PR, we don't need access lvb. So we clear LKM_VALBLK from _flags_ in __dlmconvert_master(). While we don't check LKM_VALBLK on _flags_ any more and _flags_ is never passed to any other function. Thus the clearing statement is useless though harmless. For making code clean, I made this patch to remove the useless statement.

---
 fs/ocfs2/dlm/dlmconvert.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)
fs/ocfs2/dlm/dlmconvert.c +0 -1
index f283bce..44b40a8 100644
@@ -173,7 +173,6 @@ static enum dlm_status __dlmconvert_master(struct dlm_ctxt *dlm,
 					     "into lvb: converting %s->%s\n",
 					     dlm_lock_mode_name(lock->ml.type),
 					     dlm_lock_mode_name(type));
-					flags &= ~(LKM_VALBLK);
 				}
 				break;
 		}
#2 lore raw

PATCH 1/1 ocfs2: remove a useless statement

Quoted 4 lines · Sunil Mushran

nak

I would rather leave it there. We have that if block just for it. There must have been a reason for it being there.

Ok, thanks for review.

regards,
wengang.

Quoted 26 lines
Quoted 23 lines · Wengang Wang

When we are downconvert a lock to NL from PR, we don't need access lvb. So we clear LKM_VALBLK from _flags_ in __dlmconvert_master(). While we don't check LKM_VALBLK on _flags_ any more and _flags_ is never passed to any other function. Thus the clearing statement is useless though harmless. For making code clean, I made this patch to remove the useless statement.

---
fs/ocfs2/dlm/dlmconvert.c | 1 -

1 files changed, 0 insertions(+), 1 deletions(-)
fs/ocfs2/dlm/dlmconvert.c +0 -1
index f283bce..44b40a8 100644
@@ -173,7 +173,6 @@ static enum dlm_status __dlmconvert_master(struct dlm_ctxt *dlm,
 					     "into lvb: converting %s->%s\n",
 					     dlm_lock_mode_name(lock->ml.type),
 					     dlm_lock_mode_name(type));
-					flags &= ~(LKM_VALBLK);
 				}
 				break;
 		}