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
Kirill Smelkov
linux
Commits
36f20c6d
Commit
36f20c6d
authored
Nov 25, 2005
by
Trond Myklebust
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
NFSv4: Fix buggy nfs_wait_on_sequence()
Signed-off-by:
Trond Myklebust
<
Trond.Myklebust@netapp.com
>
parent
af955987
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
10 deletions
+10
-10
fs/nfs/nfs4state.c
fs/nfs/nfs4state.c
+10
-10
No files found.
fs/nfs/nfs4state.c
View file @
36f20c6d
...
@@ -644,12 +644,15 @@ void nfs4_copy_stateid(nfs4_stateid *dst, struct nfs4_state *state, fl_owner_t f
...
@@ -644,12 +644,15 @@ void nfs4_copy_stateid(nfs4_stateid *dst, struct nfs4_state *state, fl_owner_t f
struct
nfs_seqid
*
nfs_alloc_seqid
(
struct
nfs_seqid_counter
*
counter
)
struct
nfs_seqid
*
nfs_alloc_seqid
(
struct
nfs_seqid_counter
*
counter
)
{
{
struct
rpc_sequence
*
sequence
=
counter
->
sequence
;
struct
nfs_seqid
*
new
;
struct
nfs_seqid
*
new
;
new
=
kmalloc
(
sizeof
(
*
new
),
GFP_KERNEL
);
new
=
kmalloc
(
sizeof
(
*
new
),
GFP_KERNEL
);
if
(
new
!=
NULL
)
{
if
(
new
!=
NULL
)
{
new
->
sequence
=
counter
;
new
->
sequence
=
counter
;
INIT_LIST_HEAD
(
&
new
->
list
);
spin_lock
(
&
sequence
->
lock
);
list_add_tail
(
&
new
->
list
,
&
sequence
->
list
);
spin_unlock
(
&
sequence
->
lock
);
}
}
return
new
;
return
new
;
}
}
...
@@ -658,12 +661,10 @@ void nfs_free_seqid(struct nfs_seqid *seqid)
...
@@ -658,12 +661,10 @@ void nfs_free_seqid(struct nfs_seqid *seqid)
{
{
struct
rpc_sequence
*
sequence
=
seqid
->
sequence
->
sequence
;
struct
rpc_sequence
*
sequence
=
seqid
->
sequence
->
sequence
;
if
(
!
list_empty
(
&
seqid
->
list
))
{
spin_lock
(
&
sequence
->
lock
);
spin_lock
(
&
sequence
->
lock
);
list_del
(
&
seqid
->
list
);
list_del
(
&
seqid
->
list
);
spin_unlock
(
&
sequence
->
lock
);
spin_unlock
(
&
sequence
->
lock
);
rpc_wake_up
(
&
sequence
->
wait
);
}
rpc_wake_up_next
(
&
sequence
->
wait
);
kfree
(
seqid
);
kfree
(
seqid
);
}
}
...
@@ -722,11 +723,10 @@ int nfs_wait_on_sequence(struct nfs_seqid *seqid, struct rpc_task *task)
...
@@ -722,11 +723,10 @@ int nfs_wait_on_sequence(struct nfs_seqid *seqid, struct rpc_task *task)
if
(
sequence
->
list
.
next
==
&
seqid
->
list
)
if
(
sequence
->
list
.
next
==
&
seqid
->
list
)
goto
out
;
goto
out
;
spin_lock
(
&
sequence
->
lock
);
spin_lock
(
&
sequence
->
lock
);
if
(
!
list_empty
(
&
sequence
->
list
)
)
{
if
(
sequence
->
list
.
next
!=
&
seqid
->
list
)
{
rpc_sleep_on
(
&
sequence
->
wait
,
task
,
NULL
,
NULL
);
rpc_sleep_on
(
&
sequence
->
wait
,
task
,
NULL
,
NULL
);
status
=
-
EAGAIN
;
status
=
-
EAGAIN
;
}
else
}
list_add
(
&
seqid
->
list
,
&
sequence
->
list
);
spin_unlock
(
&
sequence
->
lock
);
spin_unlock
(
&
sequence
->
lock
);
out:
out:
return
status
;
return
status
;
...
...
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