mirror of
https://github.com/SCST-project/scst.git
synced 2026-08-22 07:06:22 +00:00
2.6.38 build fixes (merged r3294 from trunk).
git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/2.0.0.x@3364 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
@@ -1263,7 +1263,7 @@ static struct iscsi_cmnd *__cmnd_find_data_wait_hash(struct iscsi_conn *conn,
|
||||
struct list_head *head;
|
||||
struct iscsi_cmnd *cmnd;
|
||||
|
||||
head = &conn->session->cmnd_data_wait_hash[cmnd_hashfn(itt)];
|
||||
head = &conn->session->cmnd_data_wait_hash[cmnd_hashfn((__force u32)itt)];
|
||||
|
||||
list_for_each_entry(cmnd, head, hash_list_entry) {
|
||||
if (cmnd->pdu.bhs.itt == itt)
|
||||
@@ -1336,7 +1336,7 @@ static int cmnd_insert_data_wait_hash(struct iscsi_cmnd *cmnd)
|
||||
|
||||
spin_lock(&session->cmnd_data_wait_hash_lock);
|
||||
|
||||
head = &session->cmnd_data_wait_hash[cmnd_hashfn(itt)];
|
||||
head = &session->cmnd_data_wait_hash[cmnd_hashfn((__force u32)itt)];
|
||||
|
||||
tmp = __cmnd_find_data_wait_hash(cmnd->conn, itt);
|
||||
if (likely(!tmp)) {
|
||||
|
||||
@@ -103,12 +103,10 @@ struct iscsi_target {
|
||||
};
|
||||
|
||||
#define ISCSI_HASH_ORDER 8
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 31)
|
||||
#define cmnd_hashfn(itt) (BUILD_BUG_ON(!__same_type(itt, __be32)), \
|
||||
hash_long((__force u32)(itt), ISCSI_HASH_ORDER))
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 25)
|
||||
#define cmnd_hashfn(itt) hash_32(itt, ISCSI_HASH_ORDER)
|
||||
#else
|
||||
/* __same_type() is not available in kernels 2.6.30 and before. */
|
||||
#define cmnd_hashfn(itt) hash_long((__force u32)(itt), ISCSI_HASH_ORDER)
|
||||
#define cmnd_hashfn(itt) hash_long(itt, ISCSI_HASH_ORDER)
|
||||
#endif
|
||||
|
||||
struct iscsi_session {
|
||||
|
||||
Reference in New Issue
Block a user