pull manipulations of rpc_cred inside alloc_nfs_open_context()
[deliverable/linux.git] / fs / nfs / dir.c
index ac289909814768a626ad817dbf40627805e7899e..23be134b3193f137c366c8e3b8af8bbf92553307 100644 (file)
@@ -1368,18 +1368,7 @@ static fmode_t flags_to_mode(int flags)
 
 static struct nfs_open_context *create_nfs_open_context(struct dentry *dentry, int open_flags)
 {
-       struct nfs_open_context *ctx;
-       struct rpc_cred *cred;
-       fmode_t fmode = flags_to_mode(open_flags);
-
-       cred = rpc_lookup_cred();
-       if (IS_ERR(cred))
-               return ERR_CAST(cred);
-       ctx = alloc_nfs_open_context(dentry, cred, fmode);
-       put_rpccred(cred);
-       if (ctx == NULL)
-               return ERR_PTR(-ENOMEM);
-       return ctx;
+       return alloc_nfs_open_context(dentry, flags_to_mode(open_flags));
 }
 
 static int do_open(struct inode *inode, struct file *filp)
This page took 0.026377 seconds and 5 git commands to generate.