diff --git a/drivers/staging/lustre/lustre/llite/llite_nfs.c b/drivers/staging/lustre/lustre/llite/llite_nfs.c index b830004803e4aa5bfdd193bda46d57d81ed6210d..32362ece2a7b328cdcc1466e54eeaf2b328560c3 100644 --- a/drivers/staging/lustre/lustre/llite/llite_nfs.c +++ b/drivers/staging/lustre/lustre/llite/llite_nfs.c @@ -147,7 +147,7 @@ ll_iget_for_nfs(struct super_block *sb, struct lu_fid *fid, struct lu_fid *paren inode = search_inode_for_lustre(sb, fid); if (IS_ERR(inode)) - RETURN(ERR_PTR(PTR_ERR(inode))); + RETURN(ERR_CAST(inode)); if (is_bad_inode(inode)) { /* we didn't find the right inode.. */ diff --git a/drivers/staging/lustre/lustre/llite/rw.c b/drivers/staging/lustre/lustre/llite/rw.c index f48766e6a212872551840ac21f267fb7456756c1..43b5f0d2b72aa61e302c2357ebcb8b81e60b4bdc 100644 --- a/drivers/staging/lustre/lustre/llite/rw.c +++ b/drivers/staging/lustre/lustre/llite/rw.c @@ -110,7 +110,7 @@ static struct ll_cl_context *ll_cl_init(struct file *file, env = cl_env_get(&refcheck); if (IS_ERR(env)) - return ERR_PTR(PTR_ERR(env)); + return ERR_CAST(env); lcc = &vvp_env_info(env)->vti_io_ctx; memset(lcc, 0, sizeof(*lcc)); diff --git a/drivers/staging/lustre/lustre/obdclass/local_storage.c b/drivers/staging/lustre/lustre/obdclass/local_storage.c index 3be35a83a495f810e8bb54164b9f3a3d4ae46f8b..e1db7abd300a38186e8eed674a826f90511a1e5f 100644 --- a/drivers/staging/lustre/lustre/obdclass/local_storage.c +++ b/drivers/staging/lustre/lustre/obdclass/local_storage.c @@ -443,7 +443,7 @@ struct dt_object *local_file_find_or_create_with_fid(const struct lu_env *env, ls = ls_device_get(dt); if (IS_ERR(ls)) { - dto = ERR_PTR(PTR_ERR(ls)); + dto = ERR_CAST(ls); } else { /* create the object */ dti->dti_attr.la_valid = LA_MODE; @@ -537,7 +537,7 @@ local_index_find_or_create_with_fid(const struct lu_env *env, ls = ls_device_get(dt); if (IS_ERR(ls)) { - dto = ERR_PTR(PTR_ERR(ls)); + dto = ERR_CAST(ls); } else { /* create the object */ dti->dti_attr.la_valid = LA_MODE;