Whamcloud - gitweb
b=23291 directory atime update test
[fs/lustre-release.git] / lustre / mdt / mdt_reint.c
index 56222c2..0755efd 100644 (file)
@@ -26,7 +26,7 @@
  * GPL HEADER END
  */
 /*
- * Copyright  2008 Sun Microsystems, Inc. All rights reserved
+ * Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
  * Use is subject to license terms.
  */
 /*
@@ -557,13 +557,13 @@ static int mdt_reint_setattr(struct mdt_thread_info *info,
 
                 /* Close the found mfd, update attributes. */
                 ma->ma_lmm_size = info->mti_mdt->mdt_max_mdsize;
-                OBD_ALLOC(ma->ma_lmm, ma->ma_lmm_size);
+                OBD_ALLOC(ma->ma_lmm, info->mti_mdt->mdt_max_mdsize);
                 if (ma->ma_lmm == NULL)
                         GOTO(out_put, rc = -ENOMEM);
 
                 mdt_mfd_close(info, mfd);
 
-                OBD_FREE(ma->ma_lmm, ma->ma_lmm_size);
+                OBD_FREE(ma->ma_lmm, info->mti_mdt->mdt_max_mdsize);
         } else {
                 rc = mdt_attr_set(info, mo, ma, rr->rr_flags);
                 if (rc)