slot_map.c (a02001086bbfb4da35d1228bebc2f1b442db455f) slot_map.c (519a286175b6422e13694ebb73aefee0b5749443)
1/* -*- mode: c; c-basic-offset: 8; -*-
2 * vim: noexpandtab sw=8 ts=8 sts=0:
3 *
4 * slot_map.c
5 *
6 *
7 *
8 * Copyright (C) 2002, 2004 Oracle. All rights reserved.

--- 292 unchanged lines hidden (view full) ---

301int ocfs2_slot_to_node_num_locked(struct ocfs2_super *osb, int slot_num,
302 unsigned int *node_num)
303{
304 struct ocfs2_slot_info *si = osb->slot_info;
305
306 assert_spin_locked(&osb->osb_lock);
307
308 BUG_ON(slot_num < 0);
1/* -*- mode: c; c-basic-offset: 8; -*-
2 * vim: noexpandtab sw=8 ts=8 sts=0:
3 *
4 * slot_map.c
5 *
6 *
7 *
8 * Copyright (C) 2002, 2004 Oracle. All rights reserved.

--- 292 unchanged lines hidden (view full) ---

301int ocfs2_slot_to_node_num_locked(struct ocfs2_super *osb, int slot_num,
302 unsigned int *node_num)
303{
304 struct ocfs2_slot_info *si = osb->slot_info;
305
306 assert_spin_locked(&osb->osb_lock);
307
308 BUG_ON(slot_num < 0);
309 BUG_ON(slot_num > osb->max_slots);
309 BUG_ON(slot_num >= osb->max_slots);
310
311 if (!si->si_slots[slot_num].sl_valid)
312 return -ENOENT;
313
314 *node_num = si->si_slots[slot_num].sl_node_num;
315 return 0;
316}
317

--- 221 unchanged lines hidden ---
310
311 if (!si->si_slots[slot_num].sl_valid)
312 return -ENOENT;
313
314 *node_num = si->si_slots[slot_num].sl_node_num;
315 return 0;
316}
317

--- 221 unchanged lines hidden ---