OSDN Git Service

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 20b3717..c9c3ede 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 c478b77..5544ee6 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.  */