Skip to content

Commit

Permalink
pNFS/files: Ensure pNFS allocation modes are consistent with nfsiod
Browse files Browse the repository at this point in the history
Ensure that pNFS file commit allocations in rpciod/nfsiod callbacks can
fail in low memory mode, so that the threads don't block and loop
forever.

Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
  • Loading branch information
Trond Myklebust committed Mar 22, 2022
1 parent 3e5f151 commit a245832
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/nfs/filelayout/filelayout.c
Original file line number Diff line number Diff line change
Expand Up @@ -1075,7 +1075,7 @@ filelayout_setup_ds_info(struct pnfs_ds_commit_info *fl_cinfo,
unsigned int size = (fl->stripe_type == STRIPE_SPARSE) ?
fl->dsaddr->ds_num : fl->dsaddr->stripe_count;

new = pnfs_alloc_commit_array(size, GFP_NOIO);
new = pnfs_alloc_commit_array(size, nfs_io_gfp_mask());
if (new) {
spin_lock(&inode->i_lock);
array = pnfs_add_commit_array(fl_cinfo, new, lseg);
Expand Down

0 comments on commit a245832

Please sign in to comment.