Whamcloud - gitweb
LU-1866 misc: fix some issues found during LFSCK
[fs/lustre-release.git] / lustre / mdt / mdt_lib.c
index 05fc80e..051421b 100644 (file)
@@ -573,10 +573,10 @@ int mdt_fix_reply(struct mdt_thread_info *info)
         acl_size = body->aclsize;
 
         /* this replay - not send info to client */
-        if (info->mti_spec.no_create == 1) {
-                md_size = 0;
-                acl_size = 0;
-        }
+       if (info->mti_spec.no_create) {
+               md_size = 0;
+               acl_size = 0;
+       }
 
         CDEBUG(D_INFO, "Shrink to md_size = %d cookie/acl_size = %d"
                         " MDSCAPA = %llx, OSSCAPA = %llx\n",
@@ -786,8 +786,8 @@ static __u64 mdt_attr_valid_xlate(__u64 in, struct mdt_reint_record *rr,
         if (in & ATTR_KILL_SGID)
                 out |= LA_KILL_SGID;
 
-        if (in & MDS_OPEN_OWNEROVERRIDE)
-                ma->ma_attr_flags |= MDS_OPEN_OWNEROVERRIDE;
+       if (in & MDS_OPEN_OWNEROVERRIDE)
+               ma->ma_attr_flags |= MDS_OWNEROVERRIDE;
 
         if (in & ATTR_FORCE)
                 ma->ma_attr_flags |= MDS_PERM_BYPASS;
@@ -954,8 +954,8 @@ static int mdt_create_unpack(struct mdt_thread_info *info)
         attr->la_ctime = rec->cr_time;
         attr->la_mtime = rec->cr_time;
         attr->la_atime = rec->cr_time;
-        attr->la_valid = LA_MODE | LA_RDEV | LA_UID | LA_GID |
-                         LA_CTIME | LA_MTIME | LA_ATIME;
+       attr->la_valid = LA_MODE | LA_RDEV | LA_UID | LA_GID | LA_TYPE |
+                        LA_CTIME | LA_MTIME | LA_ATIME;
         memset(&sp->u, 0, sizeof(sp->u));
         sp->sp_cr_flags = get_mrc_cr_flags(rec);