#define DEBUG_SUBSYSTEM S_LQUOTA
#include <linux/kthread.h>
+#include <lustre_swab.h>
#include "qsd_internal.h"
/*
/* let's do a 1MB bulk */
npages = min_t(unsigned int, OFD_MAX_BRW_SIZE, 1 << 20);
- npages /= PAGE_CACHE_SIZE;
+ npages /= PAGE_SIZE;
/* allocate pages for bulk index read */
OBD_ALLOC(pages, npages * sizeof(*pages));
if (pages == NULL)
GOTO(out, rc = -ENOMEM);
for (i = 0; i < npages; i++) {
- pages[i] = alloc_page(GFP_IOFS);
+ pages[i] = alloc_page(GFP_NOFS);
if (pages[i] == NULL)
GOTO(out, rc = -ENOMEM);
}
ver = ii->ii_version;
pg_cnt = (ii->ii_count + (LU_PAGE_COUNT) - 1);
- pg_cnt >>= PAGE_CACHE_SHIFT - LU_PAGE_SHIFT;
+ pg_cnt >>= PAGE_SHIFT - LU_PAGE_SHIFT;
if (pg_cnt > npages) {
CERROR("%s: master returned more pages than expected, %u > %u"
qqi->qqi_reint = 0;
write_unlock(&qsd->qsd_lock);
- qqi_putref(qqi);
- lu_ref_del(&qqi->qqi_reference, "reint_thread", thread);
-
thread_set_flags(thread, SVC_STOPPED);
wake_up(&thread->t_ctl_waitq);
+
+ lu_ref_del(&qqi->qqi_reference, "reint_thread", thread);
+ qqi_putref(qqi);
+
return rc;
}
}
}
-static int qsd_entry_iter_cb(cfs_hash_t *hs, cfs_hash_bd_t *bd,
+static int qsd_entry_iter_cb(struct cfs_hash *hs, struct cfs_hash_bd *bd,
struct hlist_node *hnode, void *data)
{
struct lquota_entry *lqe;