/*
* Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
* Use is subject to license terms.
+ *
+ * Copyright (c) 2011 Whamcloud, Inc.
+ *
*/
/*
* This file is part of Lustre, http://www.lustre.org/
static int cl_io_get(struct inode *inode, struct lu_env **envout,
struct cl_io **ioout, int *refcheck)
{
- struct ccc_thread_info *info;
struct lu_env *env;
struct cl_io *io;
struct cl_inode_info *lli = cl_i2info(inode);
if (S_ISREG(cl_inode_mode(inode))) {
env = cl_env_get(refcheck);
if (!IS_ERR(env)) {
- info = ccc_env_info(env);
- io = &info->cti_io;
+ io = ccc_env_thread_io(env);
io->ci_obj = clob;
*envout = env;
*ioout = io;
* cl_glimpse_size(), which doesn't make sense: glimpse locks are not
* blocking anyway.
*/
- struct lu_env *env;
- struct cl_io *io;
+ struct lu_env *env = NULL;
+ struct cl_io *io = NULL;
int result;
int refcheck;
int cl_local_size(struct inode *inode)
{
- struct lu_env *env;
- struct cl_io *io;
+ struct lu_env *env = NULL;
+ struct cl_io *io = NULL;
struct ccc_thread_info *cti;
struct cl_object *clob;
struct cl_lock_descr *descr;