summaryrefslogtreecommitdiff
path: root/firmware/vicam
diff options
context:
space:
mode:
authorJeff Layton <jlayton@poochiereds.net>2016-04-21 20:51:59 -0400
committerAnna Schumaker <Anna.Schumaker@Netapp.com>2016-05-09 09:05:40 -0400
commit90a0be00e9d29d9baac27c0c63a5e71ca1334001 (patch)
tree9e9cd625c47670bb01e20a2194cae439171ffcc2 /firmware/vicam
parent57f3f4c0cd50e90aa92eec20d9c309dd67c594a5 (diff)
nfs: get a reference to the credential in ff_layout_alloc_lseg
We're just as likely to have allocation problems here as we would if we delay looking up the credential like we currently do. Fix the code to get a rpc_cred reference early, as soon as the mirror is set up. This allows us to eliminate the mirror early if there is a problem getting an rpc credential. This also allows us to drop the uid/gid from the layout_mirror struct as well. In the event that we find an existing mirror where this one would go, we swap in the new creds unconditionally, and drop the reference to the old one. Note that the old ff_layout_update_mirror_cred function wouldn't set this pointer unless the DS version was 3, but we don't know what the DS version is at this point. I'm a little unclear on why it did that as you still need creds to talk to v4 servers as well. I have the code set it regardless of the DS version here. Also note the change to using generic creds instead of calling lookup_cred directly. With that change, we also need to populate the group_info pointer in the acred as some functions expect that to never be NULL. Instead of allocating one every time however, we can allocate one when the module is loaded and share it since the group_info is refcounted. Signed-off-by: Jeff Layton <jeff.layton@primarydata.com> Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
Diffstat (limited to 'firmware/vicam')
0 files changed, 0 insertions, 0 deletions