git.openpandora.org
/
pandora-kernel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
nfs_open_context doesn't need struct path either
[pandora-kernel.git]
/
fs
/
nfs
/
dir.c
diff --git
a/fs/nfs/dir.c
b/fs/nfs/dir.c
index
ededdbd
..
a0693f3
100644
(file)
--- a/
fs/nfs/dir.c
+++ b/
fs/nfs/dir.c
@@
-1345,10
+1345,6
@@
static int is_atomic_open(struct nameidata *nd)
static struct nfs_open_context *nameidata_to_nfs_open_context(struct dentry *dentry, struct nameidata *nd)
{
static struct nfs_open_context *nameidata_to_nfs_open_context(struct dentry *dentry, struct nameidata *nd)
{
- struct path path = {
- .mnt = nd->path.mnt,
- .dentry = dentry,
- };
struct nfs_open_context *ctx;
struct rpc_cred *cred;
fmode_t fmode = nd->intent.open.flags & (FMODE_READ | FMODE_WRITE | FMODE_EXEC);
struct nfs_open_context *ctx;
struct rpc_cred *cred;
fmode_t fmode = nd->intent.open.flags & (FMODE_READ | FMODE_WRITE | FMODE_EXEC);
@@
-1356,7
+1352,7
@@
static struct nfs_open_context *nameidata_to_nfs_open_context(struct dentry *den
cred = rpc_lookup_cred();
if (IS_ERR(cred))
return ERR_CAST(cred);
cred = rpc_lookup_cred();
if (IS_ERR(cred))
return ERR_CAST(cred);
- ctx = alloc_nfs_open_context(
&path
, cred, fmode);
+ ctx = alloc_nfs_open_context(
dentry
, cred, fmode);
put_rpccred(cred);
if (ctx == NULL)
return ERR_PTR(-ENOMEM);
put_rpccred(cred);
if (ctx == NULL)
return ERR_PTR(-ENOMEM);
@@
-1376,13
+1372,13
@@
static int nfs_intent_set_file(struct nameidata *nd, struct nfs_open_context *ct
/* If the open_intent is for execute, we have an extra check to make */
if (ctx->mode & FMODE_EXEC) {
/* If the open_intent is for execute, we have an extra check to make */
if (ctx->mode & FMODE_EXEC) {
- ret = nfs_may_open(ctx->
path.
dentry->d_inode,
+ ret = nfs_may_open(ctx->dentry->d_inode,
ctx->cred,
nd->intent.open.flags);
if (ret < 0)
goto out;
}
ctx->cred,
nd->intent.open.flags);
if (ret < 0)
goto out;
}
- filp = lookup_instantiate_filp(nd, ctx->
path.
dentry, do_open);
+ filp = lookup_instantiate_filp(nd, ctx->dentry, do_open);
if (IS_ERR(filp))
ret = PTR_ERR(filp);
else
if (IS_ERR(filp))
ret = PTR_ERR(filp);
else
@@
-1463,8
+1459,8
@@
static struct dentry *nfs_atomic_lookup(struct inode *dir, struct dentry *dentry
res = d_add_unique(dentry, inode);
nfs_unblock_sillyrename(dentry->d_parent);
if (res != NULL) {
res = d_add_unique(dentry, inode);
nfs_unblock_sillyrename(dentry->d_parent);
if (res != NULL) {
- dput(ctx->
path.
dentry);
- ctx->
path.
dentry = dget(res);
+ dput(ctx->dentry);
+ ctx->dentry = dget(res);
dentry = res;
}
err = nfs_intent_set_file(nd, ctx);
dentry = res;
}
err = nfs_intent_set_file(nd, ctx);
@@
-2273,12
+2269,12
@@
int nfs_may_open(struct inode *inode, struct rpc_cred *cred, int openflags)
return nfs_do_access(inode, cred, nfs_open_permission_mask(openflags));
}
return nfs_do_access(inode, cred, nfs_open_permission_mask(openflags));
}
-int nfs_permission(struct inode *inode, int mask
, unsigned int flags
)
+int nfs_permission(struct inode *inode, int mask)
{
struct rpc_cred *cred;
int res = 0;
{
struct rpc_cred *cred;
int res = 0;
- if (
flags & IPERM_FLAG_RCU
)
+ if (
mask & MAY_NOT_BLOCK
)
return -ECHILD;
nfs_inc_stats(inode, NFSIOS_VFSACCESS);
return -ECHILD;
nfs_inc_stats(inode, NFSIOS_VFSACCESS);
@@
-2328,7
+2324,7
@@
out:
out_notsup:
res = nfs_revalidate_inode(NFS_SERVER(inode), inode);
if (res == 0)
out_notsup:
res = nfs_revalidate_inode(NFS_SERVER(inode), inode);
if (res == 0)
- res = generic_permission(inode, mask
, flags, NULL
);
+ res = generic_permission(inode, mask);
goto out;
}
goto out;
}