Whamcloud - gitweb
Branch HEAD
[fs/lustre-release.git] / lustre / obdclass / cl_io.c
index 1b10e2a..1a172f4 100644 (file)
@@ -228,7 +228,7 @@ int cl_io_rw_init(const struct lu_env *env, struct cl_io *io,
 
         LU_OBJECT_HEADER(D_VFSTRACE, env, &io->ci_obj->co_lu,
                          "io range: %i [%llu, %llu) %i %i\n",
-                         iot, (__u64)pos, (__u64)pos + count,
+                         iot, (__u64)pos, (__u64)(pos + count),
                          io->u.ci_rw.crw_nonblock, io->u.ci_wr.wr_append);
         io->u.ci_rw.crw_pos    = pos;
         io->u.ci_rw.crw_count  = count;
@@ -466,7 +466,7 @@ void cl_io_unlock(const struct lu_env *env, struct cl_io *io)
                         scan->cis_iop->op[io->ci_type].cio_unlock(env, scan);
         }
         io->ci_state = CIS_UNLOCKED;
-        LASSERT(cl_env_info(env)->clt_nr_locks_acquired == 0);
+        LASSERT(!cl_env_info(env)->clt_counters[CNL_TOP].ctc_nr_locks_acquired);
         EXIT;
 }
 EXPORT_SYMBOL(cl_io_unlock);
@@ -1129,6 +1129,7 @@ int cl_page_list_own(const struct lu_env *env,
 {
         struct cl_page *page;
         struct cl_page *temp;
+        pgoff_t index = 0;
         int result;
 
         LINVRNT(plist->pl_owner == cfs_current());
@@ -1136,8 +1137,10 @@ int cl_page_list_own(const struct lu_env *env,
         ENTRY;
         result = 0;
         cl_page_list_for_each_safe(page, temp, plist) {
+                LASSERT(index <= page->cp_index);
+                index = page->cp_index;
                 if (cl_page_own(env, io, page) == 0)
-                result = result ?: page->cp_error;
+                        result = result ?: page->cp_error;
                 else
                         cl_page_list_del(env, plist, page);
         }