Whamcloud - gitweb
Revert "b=19427 correct lmm_object_id and reserve fids for fid-on-OST."
[fs/lustre-release.git] / lustre / obdfilter / filter_io_26.c
index 621ee05..ce656fc 100644 (file)
@@ -716,9 +716,11 @@ int filter_commitrw_write(struct obd_export *exp, struct obdo *oa,
         /* filter_direct_io drops i_mutex */
         rc = filter_direct_io(OBD_BRW_WRITE, res->dentry, iobuf, exp, &iattr,
                               oti, &wait_handle);
-
-        obdo_from_inode(oa, inode, NULL, rc == 0 ? FILTER_VALID_FLAGS : 0 |
-                                                   OBD_MD_FLUID |OBD_MD_FLGID);
+        if (rc == 0)
+                obdo_from_inode(oa, inode,
+                                FILTER_VALID_FLAGS |OBD_MD_FLUID |OBD_MD_FLGID);
+        else
+                obdo_from_inode(oa, inode, OBD_MD_FLUID | OBD_MD_FLGID);
 
         lquota_getflag(filter_quota_interface_ref, obd, oa);