NFSv4/flexfiles: Convert GFP_NOFS to GFP_KERNEL
Assume that the higher layers will have set memalloc_nofs_save/restore as appropriate. Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
This commit is contained in:
@ -694,7 +694,7 @@ nfs4_ff_layout_stat_io_start_write(struct inode *inode,
|
|||||||
spin_unlock(&mirror->lock);
|
spin_unlock(&mirror->lock);
|
||||||
|
|
||||||
if (report)
|
if (report)
|
||||||
pnfs_report_layoutstat(inode, GFP_NOIO);
|
pnfs_report_layoutstat(inode, GFP_KERNEL);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@ -900,7 +900,7 @@ retry:
|
|||||||
req->wb_bytes,
|
req->wb_bytes,
|
||||||
IOMODE_RW,
|
IOMODE_RW,
|
||||||
false,
|
false,
|
||||||
GFP_NOFS);
|
GFP_KERNEL);
|
||||||
if (IS_ERR(pgio->pg_lseg)) {
|
if (IS_ERR(pgio->pg_lseg)) {
|
||||||
pgio->pg_error = PTR_ERR(pgio->pg_lseg);
|
pgio->pg_error = PTR_ERR(pgio->pg_lseg);
|
||||||
pgio->pg_lseg = NULL;
|
pgio->pg_lseg = NULL;
|
||||||
@ -959,7 +959,7 @@ ff_layout_pg_get_mirror_count_write(struct nfs_pageio_descriptor *pgio,
|
|||||||
req->wb_bytes,
|
req->wb_bytes,
|
||||||
IOMODE_RW,
|
IOMODE_RW,
|
||||||
false,
|
false,
|
||||||
GFP_NOFS);
|
GFP_KERNEL);
|
||||||
if (IS_ERR(pgio->pg_lseg)) {
|
if (IS_ERR(pgio->pg_lseg)) {
|
||||||
pgio->pg_error = PTR_ERR(pgio->pg_lseg);
|
pgio->pg_error = PTR_ERR(pgio->pg_lseg);
|
||||||
pgio->pg_lseg = NULL;
|
pgio->pg_lseg = NULL;
|
||||||
@ -1258,7 +1258,7 @@ static void ff_layout_io_track_ds_error(struct pnfs_layout_segment *lseg,
|
|||||||
mirror = FF_LAYOUT_COMP(lseg, idx);
|
mirror = FF_LAYOUT_COMP(lseg, idx);
|
||||||
err = ff_layout_track_ds_error(FF_LAYOUT_FROM_HDR(lseg->pls_layout),
|
err = ff_layout_track_ds_error(FF_LAYOUT_FROM_HDR(lseg->pls_layout),
|
||||||
mirror, offset, length, status, opnum,
|
mirror, offset, length, status, opnum,
|
||||||
GFP_NOIO);
|
GFP_KERNEL);
|
||||||
|
|
||||||
switch (status) {
|
switch (status) {
|
||||||
case NFS4ERR_DELAY:
|
case NFS4ERR_DELAY:
|
||||||
@ -1973,7 +1973,7 @@ ff_layout_setup_ds_info(struct pnfs_ds_commit_info *fl_cinfo,
|
|||||||
struct inode *inode = lseg->pls_layout->plh_inode;
|
struct inode *inode = lseg->pls_layout->plh_inode;
|
||||||
struct pnfs_commit_array *array, *new;
|
struct pnfs_commit_array *array, *new;
|
||||||
|
|
||||||
new = pnfs_alloc_commit_array(flseg->mirror_array_cnt, GFP_NOIO);
|
new = pnfs_alloc_commit_array(flseg->mirror_array_cnt, GFP_KERNEL);
|
||||||
if (new) {
|
if (new) {
|
||||||
spin_lock(&inode->i_lock);
|
spin_lock(&inode->i_lock);
|
||||||
array = pnfs_add_commit_array(fl_cinfo, new, lseg);
|
array = pnfs_add_commit_array(fl_cinfo, new, lseg);
|
||||||
@ -2192,8 +2192,8 @@ ff_layout_send_layouterror(struct pnfs_layout_segment *lseg)
|
|||||||
if (list_empty(&head))
|
if (list_empty(&head))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
errors = kmalloc_array(NFS42_LAYOUTERROR_MAX,
|
errors = kmalloc_array(NFS42_LAYOUTERROR_MAX, sizeof(*errors),
|
||||||
sizeof(*errors), GFP_NOFS);
|
GFP_KERNEL);
|
||||||
if (errors != NULL) {
|
if (errors != NULL) {
|
||||||
const struct nfs4_ff_layout_ds_err *pos;
|
const struct nfs4_ff_layout_ds_err *pos;
|
||||||
size_t n = 0;
|
size_t n = 0;
|
||||||
@ -2444,7 +2444,8 @@ ff_layout_prepare_layoutstats(struct nfs42_layoutstat_args *args)
|
|||||||
const int dev_count = PNFS_LAYOUTSTATS_MAXDEV;
|
const int dev_count = PNFS_LAYOUTSTATS_MAXDEV;
|
||||||
|
|
||||||
/* For now, send at most PNFS_LAYOUTSTATS_MAXDEV statistics */
|
/* For now, send at most PNFS_LAYOUTSTATS_MAXDEV statistics */
|
||||||
args->devinfo = kmalloc_array(dev_count, sizeof(*args->devinfo), GFP_NOIO);
|
args->devinfo = kmalloc_array(dev_count, sizeof(*args->devinfo),
|
||||||
|
GFP_KERNEL);
|
||||||
if (!args->devinfo)
|
if (!args->devinfo)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
||||||
|
@ -1017,7 +1017,7 @@ int nfs42_proc_layouterror(struct pnfs_layout_segment *lseg,
|
|||||||
return -EOPNOTSUPP;
|
return -EOPNOTSUPP;
|
||||||
if (n > NFS42_LAYOUTERROR_MAX)
|
if (n > NFS42_LAYOUTERROR_MAX)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
data = nfs42_alloc_layouterror_data(lseg, GFP_NOFS);
|
data = nfs42_alloc_layouterror_data(lseg, GFP_KERNEL);
|
||||||
if (!data)
|
if (!data)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
for (i = 0; i < n; i++) {
|
for (i = 0; i < n; i++) {
|
||||||
|
Reference in New Issue
Block a user