Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Bricked
flo
Commits
d77d76ff
Commit
d77d76ff
authored
14 years ago
by
Trond Myklebust
Browse files
Options
Download
Email Patches
Plain Diff
NFSv41: Clean up exclusive create
Signed-off-by:
Trond Myklebust
<
Trond.Myklebust@netapp.com
>
parent
a4432345
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
13 deletions
+10
-13
fs/nfs/nfs4proc.c
fs/nfs/nfs4proc.c
+6
-11
include/linux/nfs_xdr.h
include/linux/nfs_xdr.h
+4
-2
No files found.
fs/nfs/nfs4proc.c
View file @
d77d76ff
...
...
@@ -744,19 +744,14 @@ static struct nfs4_opendata *nfs4_opendata_alloc(struct path *path,
p
->
o_arg
.
server
=
server
;
p
->
o_arg
.
bitmask
=
server
->
attr_bitmask
;
p
->
o_arg
.
claim
=
NFS4_OPEN_CLAIM_NULL
;
if
(
flags
&
O_EXCL
)
{
if
(
nfs4_has_persistent_session
(
server
->
nfs_client
))
{
/* GUARDED */
p
->
o_arg
.
u
.
attrs
=
&
p
->
attrs
;
memcpy
(
&
p
->
attrs
,
attrs
,
sizeof
(
p
->
attrs
));
}
else
{
/* EXCLUSIVE4_1 */
u32
*
s
=
(
u32
*
)
p
->
o_arg
.
u
.
verifier
.
data
;
s
[
0
]
=
jiffies
;
s
[
1
]
=
current
->
pid
;
}
}
else
if
(
flags
&
O_CREAT
)
{
if
(
flags
&
O_CREAT
)
{
u32
*
s
;
p
->
o_arg
.
u
.
attrs
=
&
p
->
attrs
;
memcpy
(
&
p
->
attrs
,
attrs
,
sizeof
(
p
->
attrs
));
s
=
(
u32
*
)
p
->
o_arg
.
u
.
verifier
.
data
;
s
[
0
]
=
jiffies
;
s
[
1
]
=
current
->
pid
;
}
p
->
c_arg
.
fh
=
&
p
->
o_res
.
fh
;
p
->
c_arg
.
stateid
=
&
p
->
o_res
.
stateid
;
...
...
This diff is collapsed.
Click to expand it.
include/linux/nfs_xdr.h
View file @
d77d76ff
...
...
@@ -196,8 +196,10 @@ struct nfs_openargs {
__u64
clientid
;
__u64
id
;
union
{
struct
iattr
*
attrs
;
/* UNCHECKED, GUARDED */
nfs4_verifier
verifier
;
/* EXCLUSIVE */
struct
{
struct
iattr
*
attrs
;
/* UNCHECKED, GUARDED */
nfs4_verifier
verifier
;
/* EXCLUSIVE */
};
nfs4_stateid
delegation
;
/* CLAIM_DELEGATE_CUR */
fmode_t
delegation_type
;
/* CLAIM_PREVIOUS */
}
u
;
...
...
This diff is collapsed.
Click to expand it.
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