mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-28 01:21:58 +00:00
NFS/flexfiles: Simplify ff_layout_get_ds_cred()
Pass in a pointer to the mirror rather than forcing another array access. Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
This commit is contained in:
parent
561d6f8aaf
commit
312cd4cb12
3 changed files with 9 additions and 8 deletions
|
@ -1783,7 +1783,7 @@ ff_layout_read_pagelist(struct nfs_pgio_header *hdr)
|
|||
if (IS_ERR(ds_clnt))
|
||||
goto out_failed;
|
||||
|
||||
ds_cred = ff_layout_get_ds_cred(lseg, idx, hdr->cred);
|
||||
ds_cred = ff_layout_get_ds_cred(mirror, &lseg->pls_range, hdr->cred);
|
||||
if (!ds_cred)
|
||||
goto out_failed;
|
||||
|
||||
|
@ -1848,7 +1848,7 @@ ff_layout_write_pagelist(struct nfs_pgio_header *hdr, int sync)
|
|||
if (IS_ERR(ds_clnt))
|
||||
goto out_failed;
|
||||
|
||||
ds_cred = ff_layout_get_ds_cred(lseg, idx, hdr->cred);
|
||||
ds_cred = ff_layout_get_ds_cred(mirror, &lseg->pls_range, hdr->cred);
|
||||
if (!ds_cred)
|
||||
goto out_failed;
|
||||
|
||||
|
@ -1933,7 +1933,7 @@ static int ff_layout_initiate_commit(struct nfs_commit_data *data, int how)
|
|||
if (IS_ERR(ds_clnt))
|
||||
goto out_err;
|
||||
|
||||
ds_cred = ff_layout_get_ds_cred(lseg, idx, data->cred);
|
||||
ds_cred = ff_layout_get_ds_cred(mirror, &lseg->pls_range, data->cred);
|
||||
if (!ds_cred)
|
||||
goto out_err;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue