[linux-next:master 9146/9596] fs/ocfs2/dlm/dlmrecovery.c:2306: warning: unused variable 'i'

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   9506597de2cde02d48c11d5c250250b9143f59f7
commit: d09f2c6cf3b86788749d16df93080476244030d3 [9146/9596] ocfs2: re-queue AST or BAST if sending is failed to improve the reliability
config: x86_64-randconfig-b0-08242253 (attached as .config)
compiler: gcc-4.4 (Debian 4.4.7-8) 4.4.7
reproduce:
        git checkout d09f2c6cf3b86788749d16df93080476244030d3
        # save the attached .config to linux build tree
        make ARCH=x86_64 

All warnings (new ones prefixed by >>):

   fs/ocfs2/dlm/dlmrecovery.c: In function 'dlm_free_dead_locks':
>> fs/ocfs2/dlm/dlmrecovery.c:2306: warning: unused variable 'i'
>> fs/ocfs2/dlm/dlmrecovery.c:2305: warning: unused variable 'queue'

vim +/i +2306 fs/ocfs2/dlm/dlmrecovery.c

  2297	
  2298	static void dlm_free_dead_locks(struct dlm_ctxt *dlm,
  2299			struct dlm_lock_resource *res, u8 dead_node,
  2300			int *reserved)
  2301	{
  2302		struct dlm_lock *lock, *next;
  2303		unsigned int freed = 0;
  2304		int reserved_tmp = 0;
> 2305		struct list_head *queue = NULL;
> 2306		int i;
  2307	
  2308		/* this node is the lockres master:
  2309		 * 1) remove any stale locks for the dead node
  2310		 * 2) if the dead node had an EX when he died, blank out the lvb
  2311		 */
  2312		assert_spin_locked(&dlm->spinlock);
  2313		assert_spin_locked(&res->spinlock);
  2314	
  2315		/* We do two dlm_lock_put(). One for removing from list and the other is
  2316		 * to force the DLM_UNLOCK_FREE_LOCK action so as to free the locks */
  2317	
  2318		/* TODO: check pending_asts, pending_basts here */
  2319		list_for_each_entry_safe(lock, next, &res->granted, list) {
  2320			if (lock->ml.node == dead_node) {
  2321				list_del_init(&lock->list);
  2322				dlm_lock_put(lock);
  2323	
  2324				reserved_tmp += dlm_drop_pending_ast_bast(dlm, lock);
  2325	
  2326				/* Can't schedule DLM_UNLOCK_FREE_LOCK - do manually */
  2327				dlm_lock_put(lock);
  2328				freed++;
  2329			}
  2330		}
  2331		list_for_each_entry_safe(lock, next, &res->converting, list) {
  2332			if (lock->ml.node == dead_node) {
  2333				list_del_init(&lock->list);
  2334				dlm_lock_put(lock);
  2335	
  2336				reserved_tmp += dlm_drop_pending_ast_bast(dlm, lock);
  2337	
  2338				/* Can't schedule DLM_UNLOCK_FREE_LOCK - do manually */
  2339				dlm_lock_put(lock);
  2340				freed++;
  2341			}
  2342		}
  2343		list_for_each_entry_safe(lock, next, &res->blocked, list) {
  2344			if (lock->ml.node == dead_node) {
  2345				list_del_init(&lock->list);
  2346				dlm_lock_put(lock);
  2347				/* Can't schedule DLM_UNLOCK_FREE_LOCK - do manually */
  2348				dlm_lock_put(lock);
  2349				freed++;
  2350			}
  2351		}
  2352	
  2353		*reserved = reserved_tmp;
  2354	
  2355		if (freed) {
  2356			mlog(0, "%s:%.*s: freed %u locks for dead node %u, "
  2357			     "dropping ref from lockres\n", dlm->name,
  2358			     res->lockname.len, res->lockname.name, freed, dead_node);
  2359			if(!test_bit(dead_node, res->refmap)) {
  2360				mlog(ML_ERROR, "%s:%.*s: freed %u locks for dead node %u, "
  2361				     "but ref was not set\n", dlm->name,
  2362				     res->lockname.len, res->lockname.name, freed, dead_node);
  2363				__dlm_print_one_lock_resource(res);
  2364			}
  2365			res->state |= DLM_LOCK_RES_RECOVERY_WAITING;
  2366			dlm_lockres_clear_refmap_bit(dlm, res, dead_node);
  2367		} else if (test_bit(dead_node, res->refmap)) {
  2368			mlog(0, "%s:%.*s: dead node %u had a ref, but had "
  2369			     "no locks and had not purged before dying\n", dlm->name,
  2370			     res->lockname.len, res->lockname.name, dead_node);
  2371			dlm_lockres_clear_refmap_bit(dlm, res, dead_node);
  2372		}
  2373	
  2374		/* do not kick thread yet */
  2375		__dlm_dirty_lockres(dlm, res);
  2376	}
  2377	

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

Attachment: .config.gz
Description: application/gzip


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]
  Powered by Linux