Skip to content

Commit 36523eb

Browse files
akpm00sfrothwell
authored andcommitted
ocfs2-dlm-optimization-of-code-while-free-dead-node-locks-checkpatch-fixes
WARNING: please, no spaces at the start of a line torvalds#26: FILE: fs/ocfs2/dlm/dlmrecovery.c:2271: + struct list_head *queue = NULL;$ WARNING: please, no spaces at the start of a line torvalds#27: FILE: fs/ocfs2/dlm/dlmrecovery.c:2272: + int i;$ WARNING: please, no spaces at the start of a line torvalds#60: FILE: fs/ocfs2/dlm/dlmrecovery.c:2285: + for (i = DLM_GRANTED_LIST; i <= DLM_BLOCKED_LIST; i++) {$ WARNING: suspect code indent for conditional statements (7, 15) torvalds#60: FILE: fs/ocfs2/dlm/dlmrecovery.c:2285: + for (i = DLM_GRANTED_LIST; i <= DLM_BLOCKED_LIST; i++) { + queue = dlm_list_idx_to_ptr(res, i); ERROR: code indent should use tabs where possible torvalds#61: FILE: fs/ocfs2/dlm/dlmrecovery.c:2286: + queue = dlm_list_idx_to_ptr(res, i);$ WARNING: please, no spaces at the start of a line torvalds#61: FILE: fs/ocfs2/dlm/dlmrecovery.c:2286: + queue = dlm_list_idx_to_ptr(res, i);$ ERROR: code indent should use tabs where possible torvalds#62: FILE: fs/ocfs2/dlm/dlmrecovery.c:2287: + list_for_each_entry_safe(lock, next, queue, list) {$ WARNING: please, no spaces at the start of a line torvalds#62: FILE: fs/ocfs2/dlm/dlmrecovery.c:2287: + list_for_each_entry_safe(lock, next, queue, list) {$ WARNING: suspect code indent for conditional statements (15, 23) torvalds#62: FILE: fs/ocfs2/dlm/dlmrecovery.c:2287: + list_for_each_entry_safe(lock, next, queue, list) { + if (lock->ml.node == dead_node) { ERROR: code indent should use tabs where possible torvalds#63: FILE: fs/ocfs2/dlm/dlmrecovery.c:2288: + if (lock->ml.node == dead_node) {$ WARNING: please, no spaces at the start of a line torvalds#63: FILE: fs/ocfs2/dlm/dlmrecovery.c:2288: + if (lock->ml.node == dead_node) {$ WARNING: suspect code indent for conditional statements (23, 31) torvalds#63: FILE: fs/ocfs2/dlm/dlmrecovery.c:2288: + if (lock->ml.node == dead_node) { + list_del_init(&lock->list); ERROR: code indent should use tabs where possible torvalds#64: FILE: fs/ocfs2/dlm/dlmrecovery.c:2289: + list_del_init(&lock->list);$ WARNING: please, no spaces at the start of a line torvalds#64: FILE: fs/ocfs2/dlm/dlmrecovery.c:2289: + list_del_init(&lock->list);$ ERROR: code indent should use tabs where possible torvalds#65: FILE: fs/ocfs2/dlm/dlmrecovery.c:2290: + dlm_lock_put(lock);$ WARNING: please, no spaces at the start of a line torvalds#65: FILE: fs/ocfs2/dlm/dlmrecovery.c:2290: + dlm_lock_put(lock);$ ERROR: code indent should use tabs where possible torvalds#66: FILE: fs/ocfs2/dlm/dlmrecovery.c:2291: + /* Can't schedule DLM_UNLOCK_FREE_LOCK$ ERROR: code indent should use tabs where possible torvalds#67: FILE: fs/ocfs2/dlm/dlmrecovery.c:2292: + * do manually$ ERROR: code indent should use tabs where possible torvalds#68: FILE: fs/ocfs2/dlm/dlmrecovery.c:2293: + */$ ERROR: code indent should use tabs where possible torvalds#69: FILE: fs/ocfs2/dlm/dlmrecovery.c:2294: + dlm_lock_put(lock);$ WARNING: please, no spaces at the start of a line torvalds#69: FILE: fs/ocfs2/dlm/dlmrecovery.c:2294: + dlm_lock_put(lock);$ ERROR: code indent should use tabs where possible #70: FILE: fs/ocfs2/dlm/dlmrecovery.c:2295: + freed++;$ WARNING: please, no spaces at the start of a line #70: FILE: fs/ocfs2/dlm/dlmrecovery.c:2295: + freed++;$ ERROR: code indent should use tabs where possible torvalds#71: FILE: fs/ocfs2/dlm/dlmrecovery.c:2296: + }$ WARNING: please, no spaces at the start of a line torvalds#71: FILE: fs/ocfs2/dlm/dlmrecovery.c:2296: + }$ total: 11 errors, 14 warnings, 51 lines checked NOTE: For some of the reported defects, checkpatch may be able to mechanically convert to the typical style using --fix or --fix-inplace. NOTE: Whitespace errors detected. You may wish to use scripts/cleanpatch or scripts/cleanfile ./patches/ocfs2-dlm-optimization-of-code-while-free-dead-node-locks.patch has style problems, please review. NOTE: If any of the errors are false positives, please report them to the maintainer, see CHECKPATCH in MAINTAINERS. Please run checkpatch prior to sending patches Cc: Guozhonghua <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
1 parent cd4f536 commit 36523eb

File tree

1 file changed

+15
-14
lines changed

1 file changed

+15
-14
lines changed

fs/ocfs2/dlm/dlmrecovery.c

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2268,8 +2268,8 @@ static void dlm_free_dead_locks(struct dlm_ctxt *dlm,
22682268
{
22692269
struct dlm_lock *lock, *next;
22702270
unsigned int freed = 0;
2271-
struct list_head *queue = NULL;
2272-
int i;
2271+
struct list_head *queue = NULL;
2272+
int i;
22732273

22742274
/* this node is the lockres master:
22752275
* 1) remove any stale locks for the dead node
@@ -2282,18 +2282,19 @@ static void dlm_free_dead_locks(struct dlm_ctxt *dlm,
22822282
* to force the DLM_UNLOCK_FREE_LOCK action so as to free the locks */
22832283

22842284
/* TODO: check pending_asts, pending_basts here */
2285-
for (i = DLM_GRANTED_LIST; i <= DLM_BLOCKED_LIST; i++) {
2286-
queue = dlm_list_idx_to_ptr(res, i);
2287-
list_for_each_entry_safe(lock, next, queue, list) {
2288-
if (lock->ml.node == dead_node) {
2289-
list_del_init(&lock->list);
2290-
dlm_lock_put(lock);
2291-
/* Can't schedule DLM_UNLOCK_FREE_LOCK
2292-
* do manually
2293-
*/
2294-
dlm_lock_put(lock);
2295-
freed++;
2296-
}
2285+
for (i = DLM_GRANTED_LIST; i <= DLM_BLOCKED_LIST; i++) {
2286+
queue = dlm_list_idx_to_ptr(res, i);
2287+
list_for_each_entry_safe(lock, next, queue, list) {
2288+
if (lock->ml.node == dead_node) {
2289+
list_del_init(&lock->list);
2290+
dlm_lock_put(lock);
2291+
/*
2292+
* Can't schedule DLM_UNLOCK_FREE_LOCK: do
2293+
* manually
2294+
*/
2295+
dlm_lock_put(lock);
2296+
freed++;
2297+
}
22972298
}
22982299
}
22992300

0 commit comments

Comments
 (0)