aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/drivers/staging/lustre/lustre/lov/lov_io.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/staging/lustre/lustre/lov/lov_io.c')
-rw-r--r--drivers/staging/lustre/lustre/lov/lov_io.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/staging/lustre/lustre/lov/lov_io.c b/drivers/staging/lustre/lustre/lov/lov_io.c
index 002326c282a7..e0f0756ee883 100644
--- a/drivers/staging/lustre/lustre/lov/lov_io.c
+++ b/drivers/staging/lustre/lustre/lov/lov_io.c
@@ -1056,9 +1056,12 @@ int lov_io_init_released(const struct lu_env *env, struct cl_object *obj,
* - in setattr, for truncate
*/
/* the truncate is for size > 0 so triggers a restore */
- if (cl_io_is_trunc(io))
+ if (cl_io_is_trunc(io)) {
io->ci_restore_needed = 1;
- result = -ENODATA;
+ result = -ENODATA;
+ } else {
+ result = 1;
+ }
break;
case CIT_READ:
case CIT_WRITE: