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
34f30896
Commit
34f30896
authored
Jun 07, 2007
by
Trond Myklebust
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
SUNRPC: Enable non-exclusive create in rpc_mkpipe()
Signed-off-by:
Trond Myklebust
<
Trond.Myklebust@netapp.com
>
parent
6e84c7b6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
4 deletions
+14
-4
net/sunrpc/rpc_pipe.c
net/sunrpc/rpc_pipe.c
+14
-4
No files found.
net/sunrpc/rpc_pipe.c
View file @
34f30896
...
@@ -621,7 +621,7 @@ __rpc_rmdir(struct inode *dir, struct dentry *dentry)
...
@@ -621,7 +621,7 @@ __rpc_rmdir(struct inode *dir, struct dentry *dentry)
}
}
static
struct
dentry
*
static
struct
dentry
*
rpc_lookup_create
(
struct
dentry
*
parent
,
const
char
*
name
,
int
len
)
rpc_lookup_create
(
struct
dentry
*
parent
,
const
char
*
name
,
int
len
,
int
exclusive
)
{
{
struct
inode
*
dir
=
parent
->
d_inode
;
struct
inode
*
dir
=
parent
->
d_inode
;
struct
dentry
*
dentry
;
struct
dentry
*
dentry
;
...
@@ -630,7 +630,7 @@ rpc_lookup_create(struct dentry *parent, const char *name, int len)
...
@@ -630,7 +630,7 @@ rpc_lookup_create(struct dentry *parent, const char *name, int len)
dentry
=
lookup_one_len
(
name
,
parent
,
len
);
dentry
=
lookup_one_len
(
name
,
parent
,
len
);
if
(
IS_ERR
(
dentry
))
if
(
IS_ERR
(
dentry
))
goto
out_err
;
goto
out_err
;
if
(
dentry
->
d_inode
)
{
if
(
dentry
->
d_inode
&&
exclusive
)
{
dput
(
dentry
);
dput
(
dentry
);
dentry
=
ERR_PTR
(
-
EEXIST
);
dentry
=
ERR_PTR
(
-
EEXIST
);
goto
out_err
;
goto
out_err
;
...
@@ -649,7 +649,7 @@ rpc_lookup_negative(char *path, struct nameidata *nd)
...
@@ -649,7 +649,7 @@ rpc_lookup_negative(char *path, struct nameidata *nd)
if
((
error
=
rpc_lookup_parent
(
path
,
nd
))
!=
0
)
if
((
error
=
rpc_lookup_parent
(
path
,
nd
))
!=
0
)
return
ERR_PTR
(
error
);
return
ERR_PTR
(
error
);
dentry
=
rpc_lookup_create
(
nd
->
dentry
,
nd
->
last
.
name
,
nd
->
last
.
len
);
dentry
=
rpc_lookup_create
(
nd
->
dentry
,
nd
->
last
.
name
,
nd
->
last
.
len
,
1
);
if
(
IS_ERR
(
dentry
))
if
(
IS_ERR
(
dentry
))
rpc_release_path
(
nd
);
rpc_release_path
(
nd
);
return
dentry
;
return
dentry
;
...
@@ -716,10 +716,20 @@ rpc_mkpipe(struct dentry *parent, const char *name, void *private, struct rpc_pi
...
@@ -716,10 +716,20 @@ rpc_mkpipe(struct dentry *parent, const char *name, void *private, struct rpc_pi
struct
inode
*
dir
,
*
inode
;
struct
inode
*
dir
,
*
inode
;
struct
rpc_inode
*
rpci
;
struct
rpc_inode
*
rpci
;
dentry
=
rpc_lookup_create
(
parent
,
name
,
strlen
(
name
));
dentry
=
rpc_lookup_create
(
parent
,
name
,
strlen
(
name
)
,
0
);
if
(
IS_ERR
(
dentry
))
if
(
IS_ERR
(
dentry
))
return
dentry
;
return
dentry
;
dir
=
parent
->
d_inode
;
dir
=
parent
->
d_inode
;
if
(
dentry
->
d_inode
)
{
rpci
=
RPC_I
(
dentry
->
d_inode
);
if
(
rpci
->
private
!=
private
||
rpci
->
ops
!=
ops
||
rpci
->
flags
!=
flags
)
{
dput
(
dentry
);
dentry
=
ERR_PTR
(
-
EBUSY
);
}
goto
out
;
}
inode
=
rpc_get_inode
(
dir
->
i_sb
,
S_IFIFO
|
S_IRUSR
|
S_IWUSR
);
inode
=
rpc_get_inode
(
dir
->
i_sb
,
S_IFIFO
|
S_IRUSR
|
S_IWUSR
);
if
(
!
inode
)
if
(
!
inode
)
goto
err_dput
;
goto
err_dput
;
...
...
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