pagebuf_lock(pb); 
xfs_flush_buftarg(	xfs_buftarg_t		*target,	int			wait){	struct list_head	tmp;	xfs_buf_t		*pb, *n;	int			pincount = 0;	pagebuf_runall_queues(xfsdatad_workqueue);	pagebuf_runall_queues(xfslogd_workqueue);	INIT_LIST_HEAD(&tmp);	spin_lock(&pbd_delwrite_lock);	list_for_each_entry_safe(pb, n, &pbd_delwrite_queue, pb_list) {		if (pb->pb_target != target)			continue;		ASSERT(pb->pb_flags & PBF_DELWRI);		PB_TRACE(pb, "walkq2", (long)pagebuf_ispin(pb));		if (pagebuf_ispin(pb)) {			pincount++;			continue;		}		pb->pb_flags &= ~PBF_DELWRI;		pb->pb_flags |= PBF_WRITE;		list_move(&pb->pb_list, &tmp);	}	spin_unlock(&pbd_delwrite_lock);	/*	 * Dropped the delayed write list lock, now walk the temporary list	 */	list_for_each_entry_safe(pb, n, &tmp, pb_list) {		if (wait)			pb->pb_flags &= ~PBF_ASYNC;		else			list_del_init(&pb->pb_list);		pagebuf_lock(pb);		pagebuf_iostrategy(pb);	}	/*	 * Remaining list items must be flushed before returning	 */	while (!list_empty(&tmp)) {		pb = list_entry(tmp.next, xfs_buf_t, pb_list);		list_del_init(&pb->pb_list);		xfs_iowait(pb);		xfs_buf_relse(pb);	}	if (wait)		blk_run_address_space(target->pbr_mapping);	return pincount;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/2f926587512869ebf6bc820bd5f030e127aae774/xfs_buf.c/buggy/fs/xfs/linux-2.6/xfs_buf.c