Commit 762bb7e9 authored by Trond Myklebust's avatar Trond Myklebust

NFS/flexfiles: Fix up sparse RCU annotations

Signed-off-by: default avatarTrond Myklebust <trond.myklebust@hammerspace.com>
parent 108bb4af
...@@ -410,7 +410,7 @@ ff_layout_alloc_lseg(struct pnfs_layout_hdr *lh, ...@@ -410,7 +410,7 @@ ff_layout_alloc_lseg(struct pnfs_layout_hdr *lh,
for (i = 0; i < fls->mirror_array_cnt; i++) { for (i = 0; i < fls->mirror_array_cnt; i++) {
struct nfs4_ff_layout_mirror *mirror; struct nfs4_ff_layout_mirror *mirror;
struct cred *kcred; struct cred *kcred;
const struct cred *cred; const struct cred __rcu *cred;
kuid_t uid; kuid_t uid;
kgid_t gid; kgid_t gid;
u32 ds_count, fh_count, id; u32 ds_count, fh_count, id;
...@@ -501,7 +501,7 @@ ff_layout_alloc_lseg(struct pnfs_layout_hdr *lh, ...@@ -501,7 +501,7 @@ ff_layout_alloc_lseg(struct pnfs_layout_hdr *lh,
goto out_err_free; goto out_err_free;
kcred->fsuid = uid; kcred->fsuid = uid;
kcred->fsgid = gid; kcred->fsgid = gid;
cred = kcred; cred = RCU_INITIALIZER(kcred);
if (lgr->range.iomode == IOMODE_READ) if (lgr->range.iomode == IOMODE_READ)
rcu_assign_pointer(fls->mirror_array[i]->ro_cred, cred); rcu_assign_pointer(fls->mirror_array[i]->ro_cred, cred);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment