Whamcloud - gitweb
LU-4405 mdc: use ibits_known mask for lock match
[fs/lustre-release.git] / lustre / osd-ldiskfs / osd_quota_fmt.c
index 6344142..6969ae5 100644 (file)
@@ -21,7 +21,7 @@
  * GPL HEADER END
  */
 /*
- * Copyright (c) 2011, 2012, Whamcloud, Inc.
+ * Copyright (c) 2012, Intel Corporation.
  * Use is subject to license terms.
  *
  * Lustre administrative quota format.
@@ -40,7 +40,7 @@ static const union
 
 static inline dqbuf_t getdqbuf(void)
 {
-       dqbuf_t buf = cfs_alloc(LUSTRE_DQBLKSIZE, CFS_ALLOC_IO);
+       dqbuf_t buf = kmalloc(LUSTRE_DQBLKSIZE, __GFP_IO);
        if (!buf)
                CWARN("Not enough memory for quota buffers.\n");
        return buf;
@@ -48,7 +48,7 @@ static inline dqbuf_t getdqbuf(void)
 
 static inline void freedqbuf(dqbuf_t buf)
 {
-       cfs_free(buf);
+       kfree(buf);
 }
 
 /**
@@ -218,7 +218,7 @@ int walk_block_dqentry(const struct lu_env *env, struct osd_object *obj,
                       int type, uint blk, uint index,
                       struct osd_it_quota *it)
 {
-       dqbuf_t                          buf = getdqbuf();
+       dqbuf_t                          buf;
        loff_t                           ret = 0;
        struct lustre_disk_dqdbheader   *dqhead;
        int                              i, dqblk_sz;
@@ -232,6 +232,7 @@ int walk_block_dqentry(const struct lu_env *env, struct osd_object *obj,
                        RETURN(1);
        }
 
+       buf = getdqbuf();
        dqhead = (struct lustre_disk_dqdbheader *)buf;
        dqblk_sz = sizeof(struct lustre_disk_dqblk_v2);
        if (!buf)