Whamcloud - gitweb
LU-6813 llite: omit to update wire data 62/16462/2
authorBobi Jam <bobijam.xu@intel.com>
Thu, 17 Sep 2015 02:45:33 +0000 (10:45 +0800)
committerOleg Drokin <oleg.drokin@intel.com>
Tue, 22 Sep 2015 23:23:06 +0000 (23:23 +0000)
In ll_setattr_raw(), after op_data->op_attr has been copied, the attr
is updated and op_data->op_attr does not get updated afterward.

Signed-off-by: Bobi Jam <bobijam.xu@intel.com>
Change-Id: I85b94a8ddc62184bfbcb128bd90f88ac03837e46
Reviewed-on: http://review.whamcloud.com/16462
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Niu Yawei <yawei.niu@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/llite/llite_lib.c

index afb7b55..78a3495 100644 (file)
@@ -1619,8 +1619,6 @@ int ll_setattr_raw(struct dentry *dentry, struct iattr *attr, bool hsm_import)
        if (op_data == NULL)
                GOTO(out, rc = -ENOMEM);
 
-       op_data->op_attr = *attr;
-
        if (!hsm_import && attr->ia_valid & ATTR_SIZE) {
                /* If we are changing file size, file content is
                 * modified, flag it. */
@@ -1629,6 +1627,8 @@ int ll_setattr_raw(struct dentry *dentry, struct iattr *attr, bool hsm_import)
                ll_file_clear_flag(lli, LLIF_DATA_MODIFIED);
        }
 
+       op_data->op_attr = *attr;
+
        rc = ll_md_setattr(dentry, op_data);
        if (rc)
                GOTO(out, rc);