lustre: don't reinvent struct bio_vec
[cascardo/linux.git] / drivers / staging / lustre / lnet / lnet / lib-md.c
index 1834bf7..e0b2f16 100644 (file)
@@ -134,11 +134,11 @@ lnet_md_build(lnet_libmd_t *lmd, lnet_md_t *umd, int unlink)
 
                for (i = 0; i < (int)niov; i++) {
                        /* We take the page pointer on trust */
-                       if (lmd->md_iov.kiov[i].kiov_offset +
-                           lmd->md_iov.kiov[i].kiov_len > PAGE_SIZE)
+                       if (lmd->md_iov.kiov[i].bv_offset +
+                           lmd->md_iov.kiov[i].bv_len > PAGE_SIZE)
                                return -EINVAL; /* invalid length */
 
-                       total_length += lmd->md_iov.kiov[i].kiov_len;
+                       total_length += lmd->md_iov.kiov[i].bv_len;
                }
 
                lmd->md_length = total_length;