Whamcloud - gitweb
LU-2683 lov: release all locks in closure to release sublock
[fs/lustre-release.git] / lustre / obdclass / cl_io.c
index ecfe76e..bcb0ad3 100644 (file)
@@ -130,6 +130,7 @@ void cl_io_fini(const struct lu_env *env, struct cl_io *io)
        switch(io->ci_type) {
        case CIT_READ:
        case CIT_WRITE:
+               break;
        case CIT_FAULT:
        case CIT_FSYNC:
                LASSERT(!io->ci_need_restart);
@@ -389,12 +390,7 @@ static int cl_lockset_lock_one(const struct lu_env *env,
 
         ENTRY;
 
-        if (io->ci_lockreq == CILR_PEEK) {
-                lock = cl_lock_peek(env, io, &link->cill_descr, "io", io);
-                if (lock == NULL)
-                        lock = ERR_PTR(-ENODATA);
-        } else
-                lock = cl_lock_request(env, io, &link->cill_descr, "io", io);
+       lock = cl_lock_request(env, io, &link->cill_descr, "io", io);
 
         if (!IS_ERR(lock)) {
                 link->cill_lock = lock;