aboutsummaryrefslogtreecommitdiff
path: root/drivers/infiniband/ulp/srp/ib_srp.c
AgeCommit message (Collapse)Author
2008-07-14RDMA: Remove subversion $Id tagsRoland Dreier
They don't get updated by git and so they're worse than useless. Signed-off-by: Roland Dreier <rolandd@cisco.com>
2008-07-14IB/srp: Remove use of cached P_Key/GID queriesRoland Dreier
The SRP initiator is currently using ib_find_cached_pkey() and ib_get_cached_gid() in situations where the uncached ib_find_pkey() and ib_query_gid() functions serve just as well: sleeping is allowed and performance is not an issue. Since we want to eliminate the cached operations in the long term, convert SRP to use the uncached variants. Signed-off-by: Roland Dreier <rolandd@cisco.com>
2008-04-19SCSI: convert struct class_device to struct deviceTony Jones
It's big, but there doesn't seem to be a way to split it up smaller... Signed-off-by: Tony Jones <tonyj@suse.de> Signed-off-by: Kay Sievers <kay.sievers@vrfy.org> Cc: Roland Dreier <rolandd@cisco.com> Cc: Sean Hefty <sean.hefty@intel.com> Cc: Hal Rosenstock <hal.rosenstock@gmail.com> Cc: James Bottomley <James.Bottomley@HansenPartnership.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-04-19IB: rename "dev" to "srp_dev" in srp_host structureGreg Kroah-Hartman
This sets us up to be able to convert the srp_host to use a struct device instead of a class_device. Based on a original patch from Tony Jones, but split up into this piece by Greg. Signed-off-by: Tony Jones <tonyj@suse.de> Signed-off-by: Kay Sievers <kay.sievers@vrfy.org> Reviewed-by: Roland Dreier <rolandd@cisco.com> Cc: Sean Hefty <sean.hefty@intel.com> Cc: Hal Rosenstock <hal.rosenstock@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-04-16IB/srp: Enforce protocol limit on srp_sg_tablesizeDavid Dillow
The current SRP initiator will allow unlimited s/g entries in the indirect descriptors lists, but the entry count field in the SRP_CMD request is 8 bits, so setting srp_sg_tablesize too large will open the possibility of wrapping the count and generating invalid requests. Clamp srp_sg_tablesize to the protocol limits to prevent surprises. Reported by Martin W. Schlining III <mschlining@datadirectnet.com>. Signed-off-by: David Dillow <dillowda@ornl.gov> Signed-off-by: Roland Dreier <rolandd@cisco.com>
2008-02-04IB/srp: Retry stale connectionsDavid Dillow
When a host just goes away (crash, power loss, etc.) without tearing down its IB connections, it can get stale connection errors when it tries to reconnect to targets upon rebooting. Retrying the connection a few times will prevent sysadmins from playing the "which disk(s) went missing?" game. This would have made things slightly quicker when tracking down some of the recent bugs, but it also helps quite a bit when you've got a large number of targets hanging off a wedged server. Signed-off-by: David Dillow <dillowda@ornl.gov> Signed-off-by: Roland Dreier <rolandd@cisco.com>
2008-01-30[SCSI] remove use_sg_chainingJames Bottomley
With the sg table code, every SCSI driver is now either chain capable or broken (or has sg_tablesize set so chaining is never activated), so there's no need to have a check in the host template. Also tidy up the code by moving the scatterlist size defines into the SCSI includes and permit the last entry of the scatterlist pools not to be a power of two. Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-01-25IB/srp: Add identifying information to log messagesDavid Dillow
When you have multiple targets, it gets really confusing when you try to track down who did a reset when there is no identifying information in the log message, especially when the same extension ID is mapped through two different local IB ports. So, add an identifier that can be used to track back to which local IB port/remote target pair is the one having problems. Signed-off-by: David Dillow <dillowda@ornl.gov> Acked-by: Pete Wyckoff <pw@osc.edu> Signed-off-by: Roland Dreier <rolandd@cisco.com>
2008-01-25IB/srp: Enable SG list chainingDavid Dillow
By default, the SCSI mid-layer seems to send down 512KB requests (sg_tablesize = 256), with some requests occasionally combined. By allowing the mid-layer to chain requests, we can easily grow to 1024KB or larger -- I've tested 4096KB I/O requests with no problems. I looked through the DMA paths on the hardware drivers to ensure they could take advantage of the SG chaining, and it seems that every one except ipath uses the system's DMA routines, which have been converted to handle chaining. ipath looks like it should be OK, but I have no way to test it. Signed-off-by: David Dillow <dillowda@ornl.gov> [ Tested on ipath. - Roland ] Signed-off-by: Roland Dreier <rolandd@cisco.com>
2008-01-25IB/srp: Respect target credit limitDavid Dillow
The current SRP initiator will send requests even if it has no credits available. The results of sending extra requests are vendor specific, but on some devices, overrunning credits will cost 85% of peak performance -- e.g. 100 MB/s vs 720 MB/s. Other devices may just drop the requests. This patch will tell the SCSI midlayer to queue requests if there are fewer than two credits remaining, and will not issue a task management request if there are no credits remaining. The mid-layer will retry the queued command once an outstanding command completes. The patch also removes the unlikely() in __srp_get_tx_iu(), as it is not at all unlikely to hit this limit under heavy load. Signed-off-by: David Dillow <dillowda@ornl.gov> Signed-off-by: Roland Dreier <rolandd@cisco.com>
2008-01-08IB/srp: Release transport before removing hostDave Dillow
The documented call sequence for removing a host is to call the transport xxx_remove_host() prior to scsi_remove_host(). The SRP transport used to crash when that order was followed, but as it is now fixed, use the documented order. Signed-off-by: David Dillow <dillowda@ornl.gov> Acked-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Signed-off-by: Roland Dreier <rolandd@cisco.com>
2008-01-03IB/srp: Fix list corruption/oops on module reloadDavid Dillow
Add a missing call to srp_remove_host() in srp_remove_one() so that we don't leak SRP transport class list entries. Tested-by: David Dillow <dillowda@ornl.gov> Acked-by: FUJITA Tomonori <tomof@acm.org> Signed-off-by: Roland Dreier <rolandd@cisco.com>
2007-10-15Merge master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6Linus Torvalds
* master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6: (207 commits) [SCSI] gdth: fix CONFIG_ISA build failure [SCSI] esp_scsi: remove __dev{init,exit} [SCSI] gdth: !use_sg cleanup and use of scsi accessors [SCSI] gdth: Move members from SCp to gdth_cmndinfo, stage 2 [SCSI] gdth: Setup proper per-command private data [SCSI] gdth: Remove gdth_ctr_tab[] [SCSI] gdth: switch to modern scsi host registration [SCSI] gdth: gdth_interrupt() gdth_get_status() & gdth_wait() fixes [SCSI] gdth: clean up host private data [SCSI] gdth: Remove virt hosts [SCSI] gdth: Reorder scsi_host_template intitializers [SCSI] gdth: kill gdth_{read,write}[bwl] wrappers [SCSI] gdth: Remove 2.4.x support, in-kernel changelog [SCSI] gdth: split out pci probing [SCSI] gdth: split out eisa probing [SCSI] gdth: split out isa probing gdth: Make one abuse of scsi_cmnd less obvious [SCSI] NCR5380: Use scsi_eh API for REQUEST_SENSE invocation [SCSI] usb storage: use scsi_eh API in REQUEST_SENSE execution [SCSI] scsi_error: Refactoring scsi_error to facilitate in synchronous REQUEST_SENSE ...
2007-10-12[SCSI] transport_srp: add rport roles attributeFUJITA Tomonori
This adds a 'roles' attribute to rport like transport_fc. The role can be initiator or target. That is, the initiator driver creates target remote ports and the target driver creates initiator remote ports. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-10-12[SCSI] ib_srp: convert to use the srp transport classFUJITA Tomonori
This converts ib_srp to use the srp transport class. I don't have ib hardware so I've not tested this patch. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Cc: Roland Dreier <rolandd@cisco.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-10-09IB/srp: Add QoS support through service IDSean Hefty
Provide the target service ID when performing a path record query to support optional QoS capability. QoS requires support from the SA. Signed-off-by: Sean Hefty <sean.hefty@intel.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
2007-08-03IB/srp: Add OUI for new Cisco targetsRaghava Kondapalli
New Cisco IB SRP targets use the Cisco OUI 00-1b-0d but still need the Topspin workarounds. Add this OUI to srp_target_is_topspin(). Signed-off-by: Roland Dreier <rolandd@cisco.com>
2007-08-03IB/srp: Wrap OUI checking for workarounds in helper functionsRoland Dreier
Wrap the checking for Mellanox and Topspin OUIs to decide whether to use a workaround into helper functions. This will make it cleaner to add a new OUI to check (as we need to do now that some targets with a Cisco OUI still need the Topspin workarounds). Signed-off-by: Roland Dreier <rolandd@cisco.com>
2007-06-07[SCSI] ib_srp: convert to use the data buffer accessorsFUJITA Tomonori
- remove the unnecessary map_single path. - convert to use the new accessors for the sg lists and the parameters. Jens Axboe <jens.axboe@oracle.com> did the for_each_sg cleanup. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Acked-by: Roland Dreier <rdreier@cisco.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-05-06IB: Add CQ comp_vector supportMichael S. Tsirkin
Add a num_comp_vectors member to struct ib_device and extend ib_create_cq() to pass in a comp_vector parameter -- this parallels the userspace libibverbs API. Update all hardware drivers to set num_comp_vectors to 1 and have all ULPs pass 0 for the comp_vector value. Pass the value of num_comp_vectors to userspace rather than hard-coding a value of 1. We want multiple CQ event vector support (via MSI-X or similar for adapters that can generate multiple interrupts), but it's not clear how many vectors we want, or how we want to deal with policy issues such as how to decide which vector to use or how to set up interrupt affinity. This patch is useful for experimenting, since no core changes will be necessary when updating a driver to support multiple vectors, and we know that we want to make at least these changes anyway. Signed-off-by: Michael S. Tsirkin <mst@dev.mellanox.co.il> Signed-off-by: Roland Dreier <rolandd@cisco.com>
2007-05-06IB/srp: Set proc_nameRoland Dreier
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2007-05-06IB/srp: Add orig_dgid sysfs attribute to scsi_hostIshai Rabinovitz
Add an orig_dgid attribute in sysfs for SRP scsi_hosts, so that userspace can tell what the original dgid value written to the add_target file was, even if the connection is redirected to a different port while connecting. Signed-off-by: Ishai Rabinovitz <ishai@mellanox.co.il> Signed-off-by: Roland Dreier <rolandd@cisco.com>
2007-02-04IB/srp: Don't wait for response when QP is in error state.Ishai Rabinovitz
When there is a call to send_tsk_mgmt SRP posts a send and waits for 5 seconds to get a response. When the QP is in the error state it is obvious that there will be no response so it is quite useless to wait. In fact, the timeout causes SRP to wait a long time to reconnect when a QP error occurs. (Each abort and each reset_device calls send_tsk_mgmt, which waits for the timeout). The following patch solves this problem by identifying the failure and returning an immediate error code. Signed-off-by: Ishai Rabinovitz <ishai@mellanox.co.il> Signed-off-by: Roland Dreier <rolandd@cisco.com>
2007-01-22IB/srp: Check match_strdup() returnIshai Rabinovitz
Checks if the kmalloc in match_strdup() was successful, and bail out on looking at the token if it failed. Signed-off-by: Ishai Rabinovitz <ishai@mellanox.co.il> Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-12-15IB/srp: Fix FMR mapping for 32-bit kernels and addresses above 4GRoland Dreier
struct srp_device.fmr_page_mask was unsigned long, which means that the top part of addresses above 4G was being chopped off on 32-bit architectures. Of course nothing good happens when data from SRP targets is DMAed to the wrong place. Fix this by changing fmr_page_mask to u64, to match the addresses actually used by IB devices. Thanks to Brian Cain <Brian.Cain@ge.com> and David McMillen <davem@systemfabricworks.com> for help diagnosing the bug and testing the fix. Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-12-12IB/srp: Use new verbs IB DMA mapping functionsRalph Campbell
Convert SRP to use the new verbs DMA mapping functions for kernel verbs consumers. Signed-off-by: Ralph Campbell <ralph.campbell@qlogic.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-12-05Merge branch 'master' of ↵David Howells
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6 Conflicts: drivers/infiniband/core/iwcm.c drivers/net/chelsio/cxgb2.c drivers/net/wireless/bcm43xx/bcm43xx_main.c drivers/net/wireless/prism54/islpci_eth.c drivers/usb/core/hub.h drivers/usb/input/hid-core.c net/core/netpoll.c Fix up merge failures with Linus's head and fix new compilation failures. Signed-Off-By: David Howells <dhowells@redhat.com>
2006-11-29IB/srp: Fix memory leak on reconnectVu Pham
SRP reallocates the IU buffers for tx_ring and rx_ring without freeing the old buffers when it reconnects to a target. Fix this by keeping the old IU buffers around. Signed-off-by: Vu Pham <vu@mellanox.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-11-29IB/srp: Increase supported CDB sizeArne Redlich
Set the Scsi_Host's max_cmd_len from 12 (default) to 16 for SRP. Otherwise scsi_dispatch_cmd() won't pass down certain commands such as READ CAPACITY 16, required for supporting disks > 2TB. Signed-off-by: Arne Redlich <arne.redlich@xiranet.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-11-22WorkStruct: make allyesconfigDavid Howells
Fix up for make allyesconfig. Signed-Off-By: David Howells <dhowells@redhat.com>
2006-10-10IB/srp: Enable multiple connections to the same targetIshai Rabinovitz
Enable multiple concurrent connections to the same SRP target: 1) Use port GUID instead of node GUID in the initiator port identifier. This allows connections to be made from multiple HCA ports at the same time. 2) Let the user specify the identifier extention when adding the device. This allows userspace to make multiple connections even from the same port, if it wants too. Without this, only one connection can be made from any given HCA, even if it has multiple ports, because we don't use multi-channel mode, so targets will only allow one connection from a given initiator port ID. Signed-off-by: Ishai Rabinovitz <ishai@mellanox.co.il> Signed-off-by: Michael S. Tsirkin <mst@mellanox.co.il> Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-10-10IB/srp: Remove redundant memset()Ishai Rabinovitz
scsi_host_alloc() already allocates with kzalloc(), so the struct Scsi_Host is zeroed out, including the private data portion. Remove the redundant memset that zeros this out again in the SRP initiator. Signed-off-by: Ishai Rabinovitz <ishai@mellanox.co.il> Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-09-22IB/sa: Require SA registrationMichael S. Tsirkin
Require users to register with SA module, to prevent the sa_query module text from going away while an SA query callback is still running. Update all in-tree users for the new interface. Signed-off-by: Michael S. Tsirkin <mst@mellanox.co.il> Signed-off-by: Sean Hefty <sean.hefty@intel.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-09-22RDMA: iWARP Core Changes.Tom Tucker
Modifications to the existing rdma header files, core files, drivers, and ulp files to support iWARP, including: - Hook iWARP CM into the build system and use it in rdma_cm. - Convert enum ib_node_type to enum rdma_node_type, which includes the possibility of RDMA_NODE_RNIC, and update everything for this. Signed-off-by: Tom Tucker <tom@opengridcomputing.com> Signed-off-by: Steve Wise <swise@opengridcomputing.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-09-22IB: Whitespace fixesRoland Dreier
Remove some trailing whitespace that has snuck in despite the best efforts of whitespace=error-all. Also fix a few other whitespace bogosities. Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-09-22IB/srp: Add port/device attributesIshai Rabinovitz
Add local_ib_device and local_ib_port attributes to srp scsi_host. These are needed when we want to connect to the same target through multiple distinct ports. Signed-off-by: Ishai Rabinovitz <ishai@mellanox.co.il> Signed-off-by: Michael S. Tsirkin <mst@mellanox.co.il> Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-09-14IB/srp: Don't schedule reconnect from srpIshai Rabinovitz
If there is a problem in the connection, the SCSI mid-layer will eventually call srp_reset_host(), which will call srp_reconnect(), so we do not need to schedule a call to srp_reconnect_work() from srp_completion(). Removing this prevents srp_reset_host() from failing if a reconnect scheduled from srp_completion() is already in progress, which in turn was causing crashes as both SCSI midlayer and srp_reconnect() were cancelling commands. Signed-off-by: Ishai Rabinovitz <ishai@mellanox.co.il> Signed-off-by: Michael S. Tsirkin <mst@mellanox.co.il> Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-08-03IB/srp: Work around data corruption bug on Mellanox targetsIshai Rabinovitz
Data corruption has been seen with Mellanox SRP targets when FMRs create a memory region with I/O virtual address != 0. Add a workaround that disables FMR merging for Mellanox targets (OUI 0002c9). Signed-off-by: Ishai Rabinovitz <ishai@mellanox.co.il> Signed-off-by: Michael S. Tsirkin <mst@mellanox.co.il> Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-08-03IB/srp: Fix crash in srp_reconnect_targetIshai Rabinovitz
Protect against srp_reset_device() clearing the req_queue while srp_reconnect_target() is in progress (note that state change at the top of srp_reconnect_target() is not sufficient for this since srp_reset_device() ignores the state). Signed-off-by: Ishai Rabinovitz <ishai@mellanox.co.il> Signed-off-by: Michael S. Tsirkin <mst@mellanox.co.il> Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-07-14[PATCH] fmr pool: remove unnecessary pointer dereferenceMichael S. Tsirkin
ib_fmr_pool_map_phys gets the virtual address by pointer but never writes there, and users (e.g. srp) seem to assume this and ignore the value returned. This patch cleans up the API to get the VA by value, and updates all users. Signed-off-by: Michael S. Tsirkin <mst@mellanox.co.il> Acked-by: Roland Dreier <rolandd@cisco.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-07-14[PATCH] srp: fix fmr error handlingVu Pham
srp_unmap_data assumes req->fmr is NULL if the request is not mapped, so we must clean it out in case of an error. Signed-off-by: Vu Pham <vu@mellanox.com> Signed-off-by: Michael S. Tsirkin <mst@mellanox.co.il> Acked-by: Roland Dreier <rolandd@cisco.com> Cc: Roland Dreier <rolandd@cisco.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-06-17IB/srp: Factor out common request reset codeIshai Rabinovitz
Misc cleanups in ib_srp: 1) I think that it is more efficient to move the req entries from req_list to free_list in srp_reconnect_target (rather than rebuild the free_list). (In any case this code is shorter). 2) This allows us to reuse code in srp_reset_device and srp_reconnect_target and call a new function srp_reset_req. Signed-off-by: Ishai Rabinovitz <ishai@mellanox.co.il> Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-06-17IB/srp: Support SRP rev. 10 targetsRamachandra K
There has been a change in the format of port identifiers between revision 10 of the SRP specification and the current revision 16A. Revision 10 specifies port identifier format as lower 8 bytes : GUID upper 8 bytes : Extension Whereas revision 16A specifies it as lower 8 bytes : Extension upper 8 bytes : GUID There are older targets (e.g. SilverStorm Virtual Fibre Channel Bridge) which conform to revision 10 of the SRP specification. The I/O class of revision 10 is 0xFF00 and the I/O class of revision 16A is 0x0100. For supporting older targets, this patch: 1) Adds a new optional target creation parameter "io_class". Default value of io_class is 0x0100 (i.e. revision 16A) 2) Uses the correct port identifier format for targets with IO class of 0xFF00 (i.e. conforming to revision 10) Signed-off-by: Ramachandra K <rkuchimanchi@silverstorm.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-06-17IB/srp: Get rid of "Target has req_lim 0" messagesRoland Dreier
It's perfectly valid for a connection to an SRP target to have a request limit of 0, so get rid of the message about it, which can spam kernel logs even with printk_ratelimit(). Keep a count of such events in a "zero_req_lim" SCSI host attribute instead, so someone who cares can look at the statistics. Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-06-17IB/srp: Handle DREQ events from CMIshai Rabinovitz
Handle IB_CM_DREQ_ERROR and IB_CM_DREQ_RECEIVED events from the CM, instead of just printing "Unhandled CM event". In the case of DREQ_ERROR, just ignore the event -- a TIMEWAIT_EXIT will be generated also. For DREQ_RECEIVED, send a DREP in response to shut the connection down cleanly. Signed-off-by: Ishai Rabinovitz <ishai@mellanox.co.il> Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-06-17IB/srp: Allow sg_tablesize to be adjustedVu Pham
Make the sg_tablesize used by SRP adjustable at module load time via a module parameter. Calculate the corresponding IU length required to support this. Signed-off-by: Vu Pham <vu@mellanox.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-06-17IB/srp: Allow cmd_per_lun to be set per target portVu Pham
Allow userspace to throttle traffic on a given connection to a target port by adding "max_cmd_per_lun=xyz" to lower the cmd_per_lun value set for that scsi_host. Signed-off-by: Vu Pham <vu@mellanox.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-06-17IB/srp: Clean up loop in srp_remove_one()Ishai Rabinovitz
Interrupts will always be enabled in srp_remove_one(), so spin_lock_irq() can be used instead of spin_lock_irqsave(). Also, the loop takes target->scsi_host->host_lock, so target->state can just be set to SRP_TARGET_REMOVED witout testing the old value. Signed-off-by: Ishai Rabinovitz <ishai@mellanox.co.il> Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-06-17IB/srp: Change target_mutex to a spinlockMatthew Wilcox
The SRP driver never sleeps while holding target_mutex, and it's just used to protect some simple list operations, so hold times will be short. So just convert it to a spinlock, which is smaller and faster. Signed-off-by: Matthew Wilcox <matthew@wil.cx> Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-06-17IB/srp: Get rid of unneeded use of list_for_each_entry_safe()Matthew Wilcox
list_for_each_entry_safe() is used in one place where the list isn't modified. So just change it to list_for_each_entry(). Signed-off-by: Matthew Wilcox <matthew@wil.cx> Signed-off-by: Roland Dreier <rolandd@cisco.com>