search for: list_for_each_saf

Displaying 20 results from an estimated 71 matches for "list_for_each_saf".

Did you mean: list_for_each_safe
2007 May 17
1
[PATCH] ocfs: use list_for_each_entry where benefical
...5:00:14.000000000 +0200 @@ -261,14 +261,12 @@ out: static void o2net_complete_nodes_nsw(struct o2net_node *nn) { - struct list_head *iter, *tmp; + struct o2net_status_wait *nsw, *tmp; unsigned int num_kills = 0; - struct o2net_status_wait *nsw; assert_spin_locked(&nn->nn_lock); - list_for_each_safe(iter, tmp, &nn->nn_status_list) { - nsw = list_entry(iter, struct o2net_status_wait, ns_node_item); + list_for_each_entry_safe(nsw, tmp, &nn->nn_status_list, ns_node_item) { o2net_complete_nsw_locked(nn, nsw, O2NET_ERR_DIED, 0); num_kills++; } @@ -764,13 +762,10 @@ EXPORT_SY...
2011 Oct 30
1
[PATCH] drm: serialize access to debugs_nodes.list
...gt;debugfs_root = debugfs_create_dir(name, root); if (!minor->debugfs_root) { @@ -194,6 +197,7 @@ int drm_debugfs_remove_files(struct drm_info_list *files, int count, struct drm_info_node *tmp; int i; + mutex_lock(&minor->debugfs_nodes.mutex); for (i = 0; i < count; i++) { list_for_each_safe(pos, q, &minor->debugfs_nodes.list) { tmp = list_entry(pos, struct drm_info_node, list); @@ -204,6 +208,7 @@ int drm_debugfs_remove_files(struct drm_info_list *files, int count, } } } + mutex_unlock(&minor->debugfs_nodes.mutex); return 0; } EXPORT_SYMBOL(drm_debugfs_...
2010 Jan 18
1
[PATCH] drm/ttm: Fix race condition in ttm_bo_delayed_delete (v2)
...int ttm_bo_delayed_delete(struct ttm_bo_device *bdev, bool remove_all) { struct ttm_bo_global *glob = bdev->glob; - struct ttm_buffer_object *entry, *nentry; - struct list_head *list, *next; - int ret; + struct ttm_buffer_object *entry; + int ret = 0; spin_lock(&glob->lru_lock); - list_for_each_safe(list, next, &bdev->ddestroy) { - entry = list_entry(list, struct ttm_buffer_object, ddestroy); - nentry = NULL; + if (list_empty(&bdev->ddestroy)) { + spin_unlock(&glob->lru_lock); + return 0; + } - /* - * Protect the next list entry from destruction while we - * un...
2010 May 31
2
[PATCH] drm/nouveau: reduce usage of fence spinlock to when absolutely necessary
...veau_fence.c index faddf53..d0775fc 100644 --- a/drivers/gpu/drm/nouveau/nouveau_fence.c +++ b/drivers/gpu/drm/nouveau/nouveau_fence.c @@ -73,6 +73,7 @@ nouveau_fence_update(struct nouveau_channel *chan) return; chan->fence.sequence_ack = sequence; + spin_lock(&chan->fence.lock); list_for_each_safe(entry, tmp, &chan->fence.pending) { fence = list_entry(entry, struct nouveau_fence, entry); @@ -84,6 +85,7 @@ nouveau_fence_update(struct nouveau_channel *chan) if (sequence == chan->fence.sequence_ack) break; } + spin_unlock(&chan->fence.lock); } int @@ -119,7 +...
2009 Jul 03
1
[RFC PATCH v3] virito-serial: A guest <-> host interface
Hello, This is a new iteration of the patches that implement virtio-serial. Changes include: * Adding support for port hot-add * Creating ports at specific ids that can be bound to specific apps / usage * Cleanups This code still doesn't get rid of the support for assigning names to ports but it just has to be ripped out. Comments welcome. Thanks, Amit.
2009 Jul 03
1
[RFC PATCH v3] virito-serial: A guest <-> host interface
Hello, This is a new iteration of the patches that implement virtio-serial. Changes include: * Adding support for port hot-add * Creating ports at specific ids that can be bound to specific apps / usage * Cleanups This code still doesn't get rid of the support for assigning names to ports but it just has to be ripped out. Comments welcome. Thanks, Amit.
2012 Jan 10
3
[PATCH v2 0/3] virtio_net: Better low memory handling.
The following series applies to net-next. The following series changes the low memory paths in virtio_net to not disable NAPI while waiting in the allocator in the slow path. It attempts to rectify some performance problems we've seen where the network performance drops significantly when memory is low. The working theory is that the disabling of NAPI while allocations are occuring in the
2012 Jan 10
3
[PATCH v2 0/3] virtio_net: Better low memory handling.
The following series applies to net-next. The following series changes the low memory paths in virtio_net to not disable NAPI while waiting in the allocator in the slow path. It attempts to rectify some performance problems we've seen where the network performance drops significantly when memory is low. The working theory is that the disabling of NAPI while allocations are occuring in the
2012 Dec 03
1
xen-blkback: move free persistent grants code
Hello Roger Pau Monne, The patch 4d4f270f1880: "xen-blkback: move free persistent grants code" from Nov 16, 2012, leads to the following warning: drivers/block/xen-blkback/blkback.c:238 free_persistent_gnts() warn: 'persistent_gnt' was already freed. drivers/block/xen-blkback/blkback.c 232 pages[segs_to_unmap] = persistent_gnt->page; 233
2012 Dec 03
1
xen-blkback: move free persistent grants code
Hello Roger Pau Monne, The patch 4d4f270f1880: "xen-blkback: move free persistent grants code" from Nov 16, 2012, leads to the following warning: drivers/block/xen-blkback/blkback.c:238 free_persistent_gnts() warn: 'persistent_gnt' was already freed. drivers/block/xen-blkback/blkback.c 232 pages[segs_to_unmap] = persistent_gnt->page; 233
2011 Mar 31
4
[PATCH] Btrfs: fix free space cache when there are pinned extents and clusters
...pace_entry) >= + PAGE_CACHE_SIZE) + next_page = true; entry++; } *crc = ~(u32)0; @@ -650,7 +724,7 @@ int btrfs_write_out_cache(struct btrfs_root *root, page_cache_release(page); index++; - } while (node); + } while (node || next_page); /* Write out the bitmaps */ list_for_each_safe(pos, n, &bitmap_list) { -- 1.7.2.3 -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
2010 Jan 20
0
[PATCH] drm/ttm: Fix race condition in ttm_bo_delayed_delete (v3, final)
...m_bo_delayed_delete(struct ttm_bo_device *bdev, bool remove_all) { struct ttm_bo_global *glob = bdev->glob; - struct ttm_buffer_object *entry, *nentry; - struct list_head *list, *next; - int ret; + struct ttm_buffer_object *entry = NULL; + int ret = 0; spin_lock(&glob->lru_lock); - list_for_each_safe(list, next, &bdev->ddestroy) { - entry = list_entry(list, struct ttm_buffer_object, ddestroy); - nentry = NULL; + if (list_empty(&bdev->ddestroy)) + goto out_unlock; - /* - * Protect the next list entry from destruction while we - * unlock the lru_lock. - */ + entry = lis...
2023 Jul 07
0
[PATCH drm-next v6 02/13] drm: manager to keep track of GPUs VA mappings
...gt;> + * @end__: ending offset, the last gpuva will start before this (but may >> + * overlap) >> + * >> + * This iterator walks over all &drm_gpuvas in the &drm_gpuva_manager that lie >> + * between @start__ and @end__. It is implemented similarly to >> + * list_for_each_safe(), but is using the &drm_gpuva_manager's internal interval >> + * tree to accelerate the search for the starting &drm_gpuva, and hence is safe >> + * against removal of elements. It assumes that @end__ is within (or is the >> + * upper limit of) the &drm_gpuva_man...
2020 Jul 27
6
[PATCH 0/4] drm: add support for retrieving EDID via ACPI _DDC
Some notebook systems provide the EDID for the internal panel via the _DDC method in ACPI, instead of or in addition to providing the EDID via DDC on LVDS/eDP. Add a DRM helper to search for an ACP _DDC method under the ACPI namespace for each VGA/3D controller, and return the first EDID successfully retrieved via _DDC. Update the i915, nouveau, and radeon DRM-KMS drivers to fall back to
2009 Jul 27
3
virtio-serial: An interface for host-guest communication
Hello all, This are the latest version of the patches. Lots of things have changed since the last submission. A few of which I remember: - VNC copy / paste works* (* conditions apply) - client vnc copies get propagated to guest port 3 (/dev/vmch3) - guest writes to port 3 (/dev/vmch3) go straight to client's clipboard - sysfs hooks to autodiscover ports - support for 64 ports in this
2009 Jul 27
3
virtio-serial: An interface for host-guest communication
Hello all, This are the latest version of the patches. Lots of things have changed since the last submission. A few of which I remember: - VNC copy / paste works* (* conditions apply) - client vnc copies get propagated to guest port 3 (/dev/vmch3) - guest writes to port 3 (/dev/vmch3) go straight to client's clipboard - sysfs hooks to autodiscover ports - support for 64 ports in this
2010 Jan 18
2
[PATCH] drm/ttm: Fix race condition in ttm_bo_delayed_delete
...int ttm_bo_delayed_delete(struct ttm_bo_device *bdev, bool remove_all) { struct ttm_bo_global *glob = bdev->glob; - struct ttm_buffer_object *entry, *nentry; - struct list_head *list, *next; - int ret; + struct ttm_buffer_object *entry; + int ret = 0; spin_lock(&glob->lru_lock); - list_for_each_safe(list, next, &bdev->ddestroy) { - entry = list_entry(list, struct ttm_buffer_object, ddestroy); - nentry = NULL; + if (list_empty(&bdev->ddestroy)) { + spin_unlock(&glob->lru_lock); + return 0; + } - /* - * Protect the next list entry from destruction while we - * un...
2020 Jul 27
0
[PATCH 1/4] drm: retrieve EDID via ACPI _DDC method
...ev->dev); + if (handle == NULL) + return NULL; + + dod_entries = get_dod_entries(handle, &num_dod_entries); + if (dod_entries == NULL || num_dod_entries == 0) + goto done; + + status = acpi_bus_get_device(handle, &device); + if (ACPI_FAILURE(status) || device == NULL) + goto done; + + list_for_each_safe(node, next, &device->children) { + struct acpi_device *child; + u64 adr; + int i; + + child = list_entry(node, struct acpi_device, node); + if (child == NULL) + continue; + + status = acpi_evaluate_integer(child->handle, "_ADR", NULL, + &adr); + if (ACPI_FAILURE(...
2007 Apr 18
0
[Bridge] [PATCH] (4/4) bridge forwarding table RCU
...lock_bh(&br->hash_lock); + spin_unlock_bh(&br->hash_lock); } void br_fdb_cleanup(unsigned long _data) @@ -126,7 +126,7 @@ struct list_head *l, *n; unsigned long delay; - write_lock_bh(&br->hash_lock); + spin_lock_bh(&br->hash_lock); delay = hold_time(br); list_for_each_safe(l, n, &br->age_list) { @@ -144,14 +144,14 @@ break; } } - write_unlock_bh(&br->hash_lock); + spin_unlock_bh(&br->hash_lock); } void br_fdb_delete_by_port(struct net_bridge *br, struct net_bridge_port *p) { int i; - write_lock_bh(&br->hash_lock); + spin...
2009 Jun 19
2
[PATCH/RFC] virtio_test: A module for testing virtio via userspace
...x = i; + vtvq->callback.received = 0; + vtvq->callback.reported = 0; + + list_add_tail(&vtvq->list, &vtest->vq_list); + } + + return 0; +} + +static void free_kaddbuf_list(struct list_head *kaddbuf_list) +{ + struct viotest_kaddbuf *kaddbuf; + struct list_head *pos, *q; + + list_for_each_safe(pos, q, kaddbuf_list) { + kaddbuf = list_entry(pos, struct viotest_kaddbuf, list); + free_kvec(kaddbuf->kdata, kaddbuf->in + kaddbuf->out); + sg_free_table(&kaddbuf->sg); + list_del(pos); + kfree(kaddbuf); + } +} + +static void free_virtqueue_list(struct virtio_device *vdev, +...