diff options
author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2013-05-20 11:42:54 -0400 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2013-06-06 16:24:37 -0400 |
commit | cd5875fefe09b1921ea5845890009c9b2386d566 (patch) | |
tree | 1ebbdd06601949100aba71fd13c93f823045dfd5 /fs/nfs/nfs4proc.c | |
parent | ab7cb0dfab0baa63f9a1faa7441b90b07881a9c7 (diff) |
NFSv4.1: Use layout credentials for get_deviceinfo calls
This is not strictly needed, since get_deviceinfo is not allowed to
return NFS4ERR_ACCESS or NFS4ERR_WRONG_CRED, but lets do it anyway
for consistency with other pNFS operations.
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/nfs4proc.c')
-rw-r--r-- | fs/nfs/nfs4proc.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c index e4398e8f512a..98f0df3ee50d 100644 --- a/fs/nfs/nfs4proc.c +++ b/fs/nfs/nfs4proc.c | |||
@@ -6547,7 +6547,9 @@ int nfs4_proc_getdevicelist(struct nfs_server *server, | |||
6547 | EXPORT_SYMBOL_GPL(nfs4_proc_getdevicelist); | 6547 | EXPORT_SYMBOL_GPL(nfs4_proc_getdevicelist); |
6548 | 6548 | ||
6549 | static int | 6549 | static int |
6550 | _nfs4_proc_getdeviceinfo(struct nfs_server *server, struct pnfs_device *pdev) | 6550 | _nfs4_proc_getdeviceinfo(struct nfs_server *server, |
6551 | struct pnfs_device *pdev, | ||
6552 | struct rpc_cred *cred) | ||
6551 | { | 6553 | { |
6552 | struct nfs4_getdeviceinfo_args args = { | 6554 | struct nfs4_getdeviceinfo_args args = { |
6553 | .pdev = pdev, | 6555 | .pdev = pdev, |
@@ -6559,6 +6561,7 @@ _nfs4_proc_getdeviceinfo(struct nfs_server *server, struct pnfs_device *pdev) | |||
6559 | .rpc_proc = &nfs4_procedures[NFSPROC4_CLNT_GETDEVICEINFO], | 6561 | .rpc_proc = &nfs4_procedures[NFSPROC4_CLNT_GETDEVICEINFO], |
6560 | .rpc_argp = &args, | 6562 | .rpc_argp = &args, |
6561 | .rpc_resp = &res, | 6563 | .rpc_resp = &res, |
6564 | .rpc_cred = cred, | ||
6562 | }; | 6565 | }; |
6563 | int status; | 6566 | int status; |
6564 | 6567 | ||
@@ -6569,14 +6572,16 @@ _nfs4_proc_getdeviceinfo(struct nfs_server *server, struct pnfs_device *pdev) | |||
6569 | return status; | 6572 | return status; |
6570 | } | 6573 | } |
6571 | 6574 | ||
6572 | int nfs4_proc_getdeviceinfo(struct nfs_server *server, struct pnfs_device *pdev) | 6575 | int nfs4_proc_getdeviceinfo(struct nfs_server *server, |
6576 | struct pnfs_device *pdev, | ||
6577 | struct rpc_cred *cred) | ||
6573 | { | 6578 | { |
6574 | struct nfs4_exception exception = { }; | 6579 | struct nfs4_exception exception = { }; |
6575 | int err; | 6580 | int err; |
6576 | 6581 | ||
6577 | do { | 6582 | do { |
6578 | err = nfs4_handle_exception(server, | 6583 | err = nfs4_handle_exception(server, |
6579 | _nfs4_proc_getdeviceinfo(server, pdev), | 6584 | _nfs4_proc_getdeviceinfo(server, pdev, cred), |
6580 | &exception); | 6585 | &exception); |
6581 | } while (exception.retry); | 6586 | } while (exception.retry); |
6582 | return err; | 6587 | return err; |