X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=blobdiff_plain;f=lustre%2Fquota%2Fqsd_reint.c;h=d9a55370457224108c92b9cc2d93633c73b09c30;hp=5263c52e816ffcfda529cc9f77d8658d46a81a42;hb=2104ed0f0da3651f0cb4ab0c78a1037891d7cb4f;hpb=adfb405433aac3691bbd00ed548203c57ce61e3a diff --git a/lustre/quota/qsd_reint.c b/lustre/quota/qsd_reint.c index 5263c52..d9a5537 100644 --- a/lustre/quota/qsd_reint.c +++ b/lustre/quota/qsd_reint.c @@ -196,14 +196,14 @@ static int qsd_reint_index(const struct lu_env *env, struct qsd_qtype_info *qqi, /* 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); } @@ -256,7 +256,7 @@ repeat: 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" @@ -532,11 +532,12 @@ out: 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; }