diff options
author | Trond Myklebust <trond.myklebust@hammerspace.com> | 2020-02-08 01:40:14 +0100 |
---|---|---|
committer | Trond Myklebust <trond.myklebust@hammerspace.com> | 2020-03-16 13:34:29 +0100 |
commit | 63ec2b69e9556fc73f34e7e36bd880caf1db1fe6 (patch) | |
tree | 8e8ec26108673300f1ba6bbee35e223464265dce /fs/nfs/pnfs.c | |
parent | NFSv4: Avoid referencing the cred unnecessarily during NFSv4 I/O (diff) | |
download | linux-63ec2b69e9556fc73f34e7e36bd880caf1db1fe6.tar.xz linux-63ec2b69e9556fc73f34e7e36bd880caf1db1fe6.zip |
NFSv4: Avoid unnecessary credential references in layoutget
Layoutget is just using the credential attached to the open context.
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Diffstat (limited to 'fs/nfs/pnfs.c')
-rw-r--r-- | fs/nfs/pnfs.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/nfs/pnfs.c b/fs/nfs/pnfs.c index b21eb4882846..cb99ac954688 100644 --- a/fs/nfs/pnfs.c +++ b/fs/nfs/pnfs.c @@ -1073,7 +1073,7 @@ pnfs_alloc_init_layoutget_args(struct inode *ino, lgp->args.ctx = get_nfs_open_context(ctx); nfs4_stateid_copy(&lgp->args.stateid, stateid); lgp->gfp_flags = gfp_flags; - lgp->cred = get_cred(ctx->cred); + lgp->cred = ctx->cred; return lgp; } @@ -1084,7 +1084,6 @@ void pnfs_layoutget_free(struct nfs4_layoutget *lgp) nfs4_free_pages(lgp->args.layout.pages, max_pages); if (lgp->args.inode) pnfs_put_layout_hdr(NFS_I(lgp->args.inode)->layout); - put_cred(lgp->cred); put_nfs_open_context(lgp->args.ctx); kfree(lgp); } |