remarkable-linux/fs/nfs
Jeff Layton 90a0be00e9 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>
2016-05-09 09:05:40 -04:00
..
blocklayout mm, fs: get rid of PAGE_CACHE_* and page_cache_{get,release} macros 2016-04-04 10:41:08 -07:00
filelayout NFS: Save struct inode * inside nfs_commit_info to clarify usage of i_lock 2016-05-09 09:05:40 -04:00
flexfilelayout nfs: get a reference to the credential in ff_layout_alloc_lseg 2016-05-09 09:05:40 -04:00
objlayout mm, fs: get rid of PAGE_CACHE_* and page_cache_{get,release} macros 2016-04-04 10:41:08 -07:00
cache_lib.c
cache_lib.h
callback.c NFS: Enable client side NFSv4.1 backchannel to use other transports 2015-11-02 16:29:13 -05:00
callback.h NFSv4.x: Allow multiple callbacks in flight 2016-01-25 09:36:21 -05:00
callback_proc.c NFSv4.x: Fix NFS4ERR_RETRY_UNCACHED_REP in nfs4_callback_sequence 2016-02-01 12:06:24 -05:00
callback_xdr.c NFSv4.x: Allow multiple callbacks in flight 2016-01-25 09:36:21 -05:00
client.c mm, fs: get rid of PAGE_CACHE_* and page_cache_{get,release} macros 2016-04-04 10:41:08 -07:00
delegation.c NFSv4: Don't use synchronous delegation recall in exception handling 2015-10-08 10:45:53 -04:00
delegation.h NFSv4: Recovery of recalled read delegations is broken 2015-09-20 22:34:16 -04:00
dir.c These changes contains a fix for overlayfs interacting with some 2016-04-07 17:22:20 -07:00
direct.c NFS: Save struct inode * inside nfs_commit_info to clarify usage of i_lock 2016-05-09 09:05:40 -04:00
dns_resolve.c
dns_resolve.h
file.c mm, fs: get rid of PAGE_CACHE_* and page_cache_{get,release} macros 2016-04-04 10:41:08 -07:00
fscache-index.c
fscache.c
fscache.h
getroot.c
inode.c These changes contains a fix for overlayfs interacting with some 2016-04-07 17:22:20 -07:00
internal.h mm, fs: get rid of PAGE_CACHE_* and page_cache_{get,release} macros 2016-04-04 10:41:08 -07:00
iostat.h
Kconfig
Makefile
mount_clnt.c NFS: Remove unneeded NFS_DEBUG checking before define NFSDBG_FACILITY 2015-10-21 15:49:23 -05:00
namespace.c
netns.h
nfs.h
nfs2super.c
nfs2xdr.c
nfs3_fs.h
nfs3acl.c posix acls: Remove duplicate xattr name definitions 2015-12-06 21:25:17 -05:00
nfs3client.c
nfs3proc.c
nfs3super.c
nfs3xdr.c xprtrdma: Fix large NFS SYMLINK calls 2015-08-05 16:21:28 -04:00
nfs4_fs.h NFSv4: Refactor NFSv4 error handling 2015-10-08 10:45:51 -04:00
nfs4client.c nfs4: start callback_ident at idr 1 2015-11-23 21:59:42 -05:00
nfs4file.c These changes contains a fix for overlayfs interacting with some 2016-04-07 17:22:20 -07:00
nfs4getroot.c nfs: Remove invalid NFS_ATTR_FATTR_V4_REFERRAL checking in nfs4_get_rootfh 2015-07-01 11:31:22 -04:00
nfs4idmap.c KEYS: Merge the type-specific data with the payload data 2015-10-21 15:18:36 +01:00
nfs4idmap.h
nfs4namespace.c
nfs4proc.c NFS client updates for Linux 4.6 2016-03-22 13:16:21 -07:00
nfs4renewd.c
nfs4session.c NFSv4.x: Allow multiple callbacks in flight 2016-01-25 09:36:21 -05:00
nfs4session.h NFSv4.x: Allow multiple callbacks in flight 2016-01-25 09:36:21 -05:00
nfs4state.c NFSv4: Don't try to reclaim unused state owners 2015-10-02 15:43:07 -04:00
nfs4super.c
nfs4sysctl.c nfs: do not initialise statics to 0 2015-12-28 09:57:15 -05:00
nfs4trace.c pNFS: Modify pnfs_update_layout tracepoints to use layout stateid 2015-12-28 09:57:14 -05:00
nfs4trace.h Merge branch 'bugfixes' 2016-01-07 18:45:36 -05:00
nfs4xdr.c mm, fs: get rid of PAGE_CACHE_* and page_cache_{get,release} macros 2016-04-04 10:41:08 -07:00
nfs42.h nfs42: add CLONE proc functions 2015-10-15 16:07:36 -04:00
nfs42proc.c nfs4: fix stateid handling for the NFS v4.2 operations 2016-02-17 11:38:07 -05:00
nfs42xdr.c nfs42: add CLONE xdr functions 2015-10-15 16:07:21 -04:00
nfsroot.c nfsroot: make nfsroot to accept the 1024 bytes long directory name 2015-10-21 15:49:19 -05:00
nfstrace.c
nfstrace.h NFS: Allow multiple commit requests in flight per file 2015-12-31 13:53:48 -05:00
pagelist.c mm, fs: get rid of PAGE_CACHE_* and page_cache_{get,release} macros 2016-04-04 10:41:08 -07:00
pnfs.c pnfs: set NFS_IOHDR_REDO in pnfs_read_resend_pnfs 2016-05-09 09:05:40 -04:00
pnfs.h pnfs: set NFS_IOHDR_REDO in pnfs_read_resend_pnfs 2016-05-09 09:05:40 -04:00
pnfs_dev.c
pnfs_nfs.c NFS: Save struct inode * inside nfs_commit_info to clarify usage of i_lock 2016-05-09 09:05:40 -04:00
proc.c
read.c mm, fs: get rid of PAGE_CACHE_* and page_cache_{get,release} macros 2016-04-04 10:41:08 -07:00
super.c NFS: Remove the left global variable nfs_callback_tcpport 2015-10-21 15:49:22 -05:00
symlink.c switch ->get_link() to delayed_call, kill ->put_link() 2015-12-30 13:01:03 -05:00
sysctl.c
unlink.c
write.c NFS: Save struct inode * inside nfs_commit_info to clarify usage of i_lock 2016-05-09 09:05:40 -04:00