NFS/pnfs: Don't use RPC_TASK_CRED_NOREF with pnfs
When we're doing pnfs then the credential being used for the RPC call
is not necessarily the same as the one used in the open context, so
don't use RPC_TASK_CRED_NOREF.
Fixes: 6129650720
("NFSv4: Avoid referencing the cred unnecessarily during NFSv4 I/O")
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
This commit is contained in:
parent
f304a809a9
commit
4fa7ef69e2
|
@ -752,7 +752,7 @@ int nfs_initiate_pgio(struct rpc_clnt *clnt, struct nfs_pgio_header *hdr,
|
||||||
.callback_ops = call_ops,
|
.callback_ops = call_ops,
|
||||||
.callback_data = hdr,
|
.callback_data = hdr,
|
||||||
.workqueue = nfsiod_workqueue,
|
.workqueue = nfsiod_workqueue,
|
||||||
.flags = RPC_TASK_ASYNC | RPC_TASK_CRED_NOREF | flags,
|
.flags = RPC_TASK_ASYNC | flags,
|
||||||
};
|
};
|
||||||
|
|
||||||
hdr->rw_ops->rw_initiate(hdr, &msg, rpc_ops, &task_setup_data, how);
|
hdr->rw_ops->rw_initiate(hdr, &msg, rpc_ops, &task_setup_data, how);
|
||||||
|
@ -950,7 +950,8 @@ static int nfs_generic_pg_pgios(struct nfs_pageio_descriptor *desc)
|
||||||
hdr->cred,
|
hdr->cred,
|
||||||
NFS_PROTO(hdr->inode),
|
NFS_PROTO(hdr->inode),
|
||||||
desc->pg_rpc_callops,
|
desc->pg_rpc_callops,
|
||||||
desc->pg_ioflags, 0);
|
desc->pg_ioflags,
|
||||||
|
RPC_TASK_CRED_NOREF);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -536,7 +536,8 @@ pnfs_generic_commit_pagelist(struct inode *inode, struct list_head *mds_pages,
|
||||||
nfs_init_commit(data, NULL, NULL, cinfo);
|
nfs_init_commit(data, NULL, NULL, cinfo);
|
||||||
nfs_initiate_commit(NFS_CLIENT(inode), data,
|
nfs_initiate_commit(NFS_CLIENT(inode), data,
|
||||||
NFS_PROTO(data->inode),
|
NFS_PROTO(data->inode),
|
||||||
data->mds_ops, how, 0);
|
data->mds_ops, how,
|
||||||
|
RPC_TASK_CRED_NOREF);
|
||||||
} else {
|
} else {
|
||||||
nfs_init_commit(data, NULL, data->lseg, cinfo);
|
nfs_init_commit(data, NULL, data->lseg, cinfo);
|
||||||
initiate_commit(data, how);
|
initiate_commit(data, how);
|
||||||
|
|
|
@ -1695,7 +1695,7 @@ int nfs_initiate_commit(struct rpc_clnt *clnt, struct nfs_commit_data *data,
|
||||||
.callback_ops = call_ops,
|
.callback_ops = call_ops,
|
||||||
.callback_data = data,
|
.callback_data = data,
|
||||||
.workqueue = nfsiod_workqueue,
|
.workqueue = nfsiod_workqueue,
|
||||||
.flags = RPC_TASK_ASYNC | RPC_TASK_CRED_NOREF | flags,
|
.flags = RPC_TASK_ASYNC | flags,
|
||||||
.priority = priority,
|
.priority = priority,
|
||||||
};
|
};
|
||||||
/* Set up the initial task struct. */
|
/* Set up the initial task struct. */
|
||||||
|
@ -1813,7 +1813,7 @@ nfs_commit_list(struct inode *inode, struct list_head *head, int how,
|
||||||
nfs_init_commit(data, head, NULL, cinfo);
|
nfs_init_commit(data, head, NULL, cinfo);
|
||||||
atomic_inc(&cinfo->mds->rpcs_out);
|
atomic_inc(&cinfo->mds->rpcs_out);
|
||||||
return nfs_initiate_commit(NFS_CLIENT(inode), data, NFS_PROTO(inode),
|
return nfs_initiate_commit(NFS_CLIENT(inode), data, NFS_PROTO(inode),
|
||||||
data->mds_ops, how, 0);
|
data->mds_ops, how, RPC_TASK_CRED_NOREF);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Reference in New Issue
Block a user