]> git.baikalelectronics.ru Git - kernel.git/commitdiff
NFS: Assume cred is pinned by open context in I/O requests
authorTrond Myklebust <trond.myklebust@hammerspace.com>
Sat, 8 Feb 2020 00:25:56 +0000 (19:25 -0500)
committerTrond Myklebust <trond.myklebust@hammerspace.com>
Mon, 16 Mar 2020 12:34:29 +0000 (08:34 -0400)
In read/write/commit, we should be able to assume that the cred is
pinned by the open context.

Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
fs/nfs/pagelist.c
fs/nfs/write.c

index 20b3717cd7ca83b8bb9efad78c9099b0d7a144a2..c9c3edefc5be6f67ba4d678099ee5b871b015545 100644 (file)
@@ -627,7 +627,7 @@ int nfs_initiate_pgio(struct rpc_clnt *clnt, struct nfs_pgio_header *hdr,
                .callback_ops = call_ops,
                .callback_data = hdr,
                .workqueue = nfsiod_workqueue,
-               .flags = RPC_TASK_ASYNC | flags,
+               .flags = RPC_TASK_ASYNC | RPC_TASK_CRED_NOREF | flags,
        };
        int ret = 0;
 
index c478b772cc49a3a583611612ef54714cfbea5437..5544ee6cfda84bef122fdb37db77736353920f01 100644 (file)
@@ -1707,7 +1707,7 @@ int nfs_initiate_commit(struct rpc_clnt *clnt, struct nfs_commit_data *data,
                .callback_ops = call_ops,
                .callback_data = data,
                .workqueue = nfsiod_workqueue,
-               .flags = RPC_TASK_ASYNC | flags,
+               .flags = RPC_TASK_ASYNC | RPC_TASK_CRED_NOREF | flags,
                .priority = priority,
        };
        /* Set up the initial task struct.  */