Whamcloud - gitweb
LU-16044 osd: discard pagecache in truncate's declaration
[fs/lustre-release.git] / lustre / osd-ldiskfs / osd_handler.c
index a3bbd15..661690a 100644 (file)
@@ -2899,6 +2899,10 @@ static int osd_declare_attr_set(const struct lu_env *env,
                        RETURN(rc);
        }
 #endif
+       /* punch must be aware we are dealing with an encrypted file */
+       if (attr->la_valid & LA_FLAGS && attr->la_flags & LUSTRE_ENCRYPT_FL)
+               obj->oo_lma_flags |= LUSTRE_ENCRYPT_FL;
+
        RETURN(rc);
 }