Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
4c1b4756
Commit
4c1b4756
authored
Jan 04, 2005
by
Trond Myklebust
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
NFSv4: Make nfs4_do_open() take a dentry argument.
Signed-off-by:
Trond Myklebust
<
trond.myklebust@fys.uio.no
>
parent
462ccee7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
fs/nfs/nfs4proc.c
fs/nfs/nfs4proc.c
+8
-8
No files found.
fs/nfs/nfs4proc.c
View file @
4c1b4756
...
@@ -477,7 +477,7 @@ static struct nfs4_state *nfs4_open_delegated(struct inode *inode, int flags, st
...
@@ -477,7 +477,7 @@ static struct nfs4_state *nfs4_open_delegated(struct inode *inode, int flags, st
/*
/*
* Returns an nfs4_state + an referenced inode
* 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_owner
*
sp
;
struct
nfs4_state
*
state
=
NULL
;
struct
nfs4_state
*
state
=
NULL
;
...
@@ -491,7 +491,7 @@ static int _nfs4_do_open(struct inode *dir, struct qstr *name, int flags, struct
...
@@ -491,7 +491,7 @@ static int _nfs4_do_open(struct inode *dir, struct qstr *name, int flags, struct
struct
nfs_openargs
o_arg
=
{
struct
nfs_openargs
o_arg
=
{
.
fh
=
NFS_FH
(
dir
),
.
fh
=
NFS_FH
(
dir
),
.
open_flags
=
flags
,
.
open_flags
=
flags
,
.
name
=
name
,
.
name
=
&
dentry
->
d_
name
,
.
server
=
server
,
.
server
=
server
,
.
bitmask
=
server
->
attr_bitmask
,
.
bitmask
=
server
->
attr_bitmask
,
.
claim
=
NFS4_OPEN_CLAIM_NULL
,
.
claim
=
NFS4_OPEN_CLAIM_NULL
,
...
@@ -581,14 +581,14 @@ static int _nfs4_do_open(struct inode *dir, struct qstr *name, int flags, struct
...
@@ -581,14 +581,14 @@ static int _nfs4_do_open(struct inode *dir, struct qstr *name, int flags, struct
}
}
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_exception
exception
=
{
};
struct
nfs4_state
*
res
;
struct
nfs4_state
*
res
;
int
status
;
int
status
;
do
{
do
{
status
=
_nfs4_do_open
(
dir
,
name
,
flags
,
sattr
,
cred
,
&
res
);
status
=
_nfs4_do_open
(
dir
,
dentry
,
flags
,
sattr
,
cred
,
&
res
);
if
(
status
==
0
)
if
(
status
==
0
)
break
;
break
;
/* NOTE: BAD_SEQID means the server and client disagree about the
/* NOTE: BAD_SEQID means the server and client disagree about the
...
@@ -785,7 +785,7 @@ nfs4_atomic_open(struct inode *dir, struct dentry *dentry, struct nameidata *nd)
...
@@ -785,7 +785,7 @@ nfs4_atomic_open(struct inode *dir, struct dentry *dentry, struct nameidata *nd)
}
}
cred
=
rpcauth_lookupcred
(
NFS_SERVER
(
dir
)
->
client
->
cl_auth
,
0
);
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
);
put_rpccred
(
cred
);
if
(
IS_ERR
(
state
))
if
(
IS_ERR
(
state
))
return
(
struct
inode
*
)
state
;
return
(
struct
inode
*
)
state
;
...
@@ -802,7 +802,7 @@ nfs4_open_revalidate(struct inode *dir, struct dentry *dentry, int openflags)
...
@@ -802,7 +802,7 @@ nfs4_open_revalidate(struct inode *dir, struct dentry *dentry, int openflags)
cred
=
rpcauth_lookupcred
(
NFS_SERVER
(
dir
)
->
client
->
cl_auth
,
0
);
cred
=
rpcauth_lookupcred
(
NFS_SERVER
(
dir
)
->
client
->
cl_auth
,
0
);
state
=
nfs4_open_delegated
(
dentry
->
d_inode
,
openflags
,
cred
);
state
=
nfs4_open_delegated
(
dentry
->
d_inode
,
openflags
,
cred
);
if
(
IS_ERR
(
state
))
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
);
put_rpccred
(
cred
);
if
(
state
==
ERR_PTR
(
-
ENOENT
)
&&
dentry
->
d_inode
==
0
)
if
(
state
==
ERR_PTR
(
-
ENOENT
)
&&
dentry
->
d_inode
==
0
)
return
1
;
return
1
;
...
@@ -1026,7 +1026,7 @@ nfs4_proc_setattr(struct dentry *dentry, struct nfs_fattr *fattr,
...
@@ -1026,7 +1026,7 @@ nfs4_proc_setattr(struct dentry *dentry, struct nfs_fattr *fattr,
FMODE_WRITE
,
cred
);
FMODE_WRITE
,
cred
);
if
(
IS_ERR
(
state
))
if
(
IS_ERR
(
state
))
state
=
nfs4_do_open
(
dentry
->
d_parent
->
d_inode
,
state
=
nfs4_do_open
(
dentry
->
d_parent
->
d_inode
,
&
dentry
->
d_name
,
FMODE_WRITE
,
dentry
,
FMODE_WRITE
,
NULL
,
cred
);
NULL
,
cred
);
need_iput
=
1
;
need_iput
=
1
;
}
}
...
@@ -1335,7 +1335,7 @@ nfs4_proc_create(struct inode *dir, struct dentry *dentry, struct iattr *sattr,
...
@@ -1335,7 +1335,7 @@ nfs4_proc_create(struct inode *dir, struct dentry *dentry, struct iattr *sattr,
struct
rpc_cred
*
cred
;
struct
rpc_cred
*
cred
;
cred
=
rpcauth_lookupcred
(
NFS_SERVER
(
dir
)
->
client
->
cl_auth
,
0
);
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
);
put_rpccred
(
cred
);
if
(
!
IS_ERR
(
state
))
{
if
(
!
IS_ERR
(
state
))
{
inode
=
state
->
inode
;
inode
=
state
->
inode
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment