NFSv4: Make nfs4_do_open() take a dentry argument. Signed-off-by: Trond Myklebust --- nfs4proc.c | 16 ++++++++-------- 1 files changed, 8 insertions(+), 8 deletions(-) Index: linux-2.6.9-rc1/fs/nfs/nfs4proc.c =================================================================== --- linux-2.6.9-rc1.orig/fs/nfs/nfs4proc.c 2004-09-03 19:48:57.148423813 -0400 +++ linux-2.6.9-rc1/fs/nfs/nfs4proc.c 2004-09-03 19:56:55.246789585 -0400 @@ -477,7 +477,7 @@ /* * Returns an nfs4_state + an referenced inode */ -static int _nfs4_do_open(struct inode *dir, struct qstr *name, int flags, struct iattr *sattr, struct rpc_cred *cred, struct nfs4_state **res) +static int _nfs4_do_open(struct inode *dir, struct dentry *dentry, int flags, struct iattr *sattr, struct rpc_cred *cred, struct nfs4_state **res) { struct nfs4_state_owner *sp; struct nfs4_state *state = NULL; @@ -491,7 +491,7 @@ struct nfs_openargs o_arg = { .fh = NFS_FH(dir), .open_flags = flags, - .name = name, + .name = &dentry->d_name, .server = server, .bitmask = server->attr_bitmask, .claim = NFS4_OPEN_CLAIM_NULL, @@ -581,14 +581,14 @@ } -struct nfs4_state *nfs4_do_open(struct inode *dir, struct qstr *name, int flags, struct iattr *sattr, struct rpc_cred *cred) +struct nfs4_state *nfs4_do_open(struct inode *dir, struct dentry *dentry, int flags, struct iattr *sattr, struct rpc_cred *cred) { struct nfs4_exception exception = { }; struct nfs4_state *res; int status; do { - status = _nfs4_do_open(dir, name, flags, sattr, cred, &res); + status = _nfs4_do_open(dir, dentry, flags, sattr, cred, &res); if (status == 0) break; /* NOTE: BAD_SEQID means the server and client disagree about the @@ -785,7 +785,7 @@ } cred = rpcauth_lookupcred(NFS_SERVER(dir)->client->cl_auth, 0); - state = nfs4_do_open(dir, &dentry->d_name, nd->intent.open.flags, &attr, cred); + state = nfs4_do_open(dir, dentry, nd->intent.open.flags, &attr, cred); put_rpccred(cred); if (IS_ERR(state)) return (struct inode *)state; @@ -802,7 +802,7 @@ cred = rpcauth_lookupcred(NFS_SERVER(dir)->client->cl_auth, 0); state = nfs4_open_delegated(dentry->d_inode, openflags, cred); if (IS_ERR(state)) - state = nfs4_do_open(dir, &dentry->d_name, openflags, NULL, cred); + state = nfs4_do_open(dir, dentry, openflags, NULL, cred); put_rpccred(cred); if (state == ERR_PTR(-ENOENT) && dentry->d_inode == 0) return 1; @@ -1026,7 +1026,7 @@ FMODE_WRITE, cred); if (IS_ERR(state)) state = nfs4_do_open(dentry->d_parent->d_inode, - &dentry->d_name, FMODE_WRITE, + dentry, FMODE_WRITE, NULL, cred); need_iput = 1; } @@ -1335,7 +1335,7 @@ struct rpc_cred *cred; cred = rpcauth_lookupcred(NFS_SERVER(dir)->client->cl_auth, 0); - state = nfs4_do_open(dir, &dentry->d_name, flags, sattr, cred); + state = nfs4_do_open(dir, dentry, flags, sattr, cred); put_rpccred(cred); if (!IS_ERR(state)) { inode = state->inode;