From: Trond Myklebust Date: Tue, 26 Feb 2019 16:56:12 +0000 (-0500) Subject: NFS/flexfiles: Fix up sparse RCU annotations X-Git-Tag: v5.4-rc1~1375^2~36 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=762bb7e97351b37c6267509d5806b4c151250ab1;p=platform%2Fkernel%2Flinux-rpi.git NFS/flexfiles: Fix up sparse RCU annotations Signed-off-by: Trond Myklebust --- diff --git a/fs/nfs/flexfilelayout/flexfilelayout.c b/fs/nfs/flexfilelayout/flexfilelayout.c index 32701b6..244a03c 100644 --- a/fs/nfs/flexfilelayout/flexfilelayout.c +++ b/fs/nfs/flexfilelayout/flexfilelayout.c @@ -410,7 +410,7 @@ ff_layout_alloc_lseg(struct pnfs_layout_hdr *lh, for (i = 0; i < fls->mirror_array_cnt; i++) { struct nfs4_ff_layout_mirror *mirror; struct cred *kcred; - const struct cred *cred; + const struct cred __rcu *cred; kuid_t uid; kgid_t gid; u32 ds_count, fh_count, id; @@ -501,7 +501,7 @@ ff_layout_alloc_lseg(struct pnfs_layout_hdr *lh, goto out_err_free; kcred->fsuid = uid; kcred->fsgid = gid; - cred = kcred; + cred = RCU_INITIALIZER(kcred); if (lgr->range.iomode == IOMODE_READ) rcu_assign_pointer(fls->mirror_array[i]->ro_cred, cred);