Whamcloud - gitweb
LU-1337 llite: kernel 3.1 kills inode->i_alloc_sem
[fs/lustre-release.git] / lustre / osd-ldiskfs / osd_io.c
index 5626f5f..0e19e80 100644 (file)
@@ -448,7 +448,6 @@ struct page *osd_get_page(struct dt_object *dt, loff_t offset, int rw)
 /*
  * there are following "locks":
  * journal_start
- * i_alloc_sem
  * i_mutex
  * page lock
 
@@ -1013,8 +1012,7 @@ static ssize_t osd_declare_write(const struct lu_env *env, struct dt_object *dt,
         else
                 credits = osd_dto_credits_noquota[DTO_WRITE_BLOCK];
 
-        OSD_DECLARE_OP(oh, write);
-        oh->ot_credits += credits;
+       OSD_DECLARE_OP(oh, write, credits);
 
        inode = osd_dt_obj(dt)->oo_inode;
 
@@ -1174,8 +1172,6 @@ static int osd_declare_punch(const struct lu_env *env, struct dt_object *dt,
         LASSERT(th);
         oh = container_of(th, struct osd_thandle, ot_super);
 
-        OSD_DECLARE_OP(oh, punch);
-
         /*
          * we don't need to reserve credits for whole truncate
          * it's not possible as truncate may need to free too many
@@ -1184,8 +1180,8 @@ static int osd_declare_punch(const struct lu_env *env, struct dt_object *dt,
          * orphan list. if needed truncate will extend or restart
          * transaction
          */
-        oh->ot_credits += osd_dto_credits_noquota[DTO_ATTR_SET_BASE];
-        oh->ot_credits += 3;
+       OSD_DECLARE_OP(oh, punch,
+                      osd_dto_credits_noquota[DTO_ATTR_SET_BASE] + 3);
 
        inode = osd_dt_obj(dt)->oo_inode;
        LASSERT(inode);