Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linux-davinci
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
linux
linux-davinci
Commits
14e49046
Commit
14e49046
authored
Jul 28, 2009
by
Thomas Gleixner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
xfs: convert b_sema to anon_semaphore
Signed-off-by:
Thomas Gleixner
<
tglx@linutronix.de
>
parent
da53d0dc
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
6 deletions
+6
-6
fs/xfs/linux-2.6/xfs_buf.c
fs/xfs/linux-2.6/xfs_buf.c
+5
-5
fs/xfs/linux-2.6/xfs_buf.h
fs/xfs/linux-2.6/xfs_buf.h
+1
-1
No files found.
fs/xfs/linux-2.6/xfs_buf.c
View file @
14e49046
...
...
@@ -263,7 +263,7 @@ _xfs_buf_initialize(
init_completion
(
&
bp
->
b_iowait
);
INIT_LIST_HEAD
(
&
bp
->
b_list
);
INIT_LIST_HEAD
(
&
bp
->
b_hash_list
);
semaphore_init_locked
(
&
bp
->
b_sema
);
/* held, no waiters */
anon_
semaphore_init_locked
(
&
bp
->
b_sema
);
/* held, no waiters */
XB_SET_OWNER
(
bp
);
bp
->
b_target
=
target
;
bp
->
b_file_offset
=
range_base
;
...
...
@@ -545,7 +545,7 @@ found:
* if this does not work then we need to drop the
* spinlock and do a hard attempt on the semaphore.
*/
if
(
down_trylock
(
&
bp
->
b_sema
))
{
if
(
anon_
down_trylock
(
&
bp
->
b_sema
))
{
if
(
!
(
flags
&
XBF_TRYLOCK
))
{
/* wait for buffer ownership */
XB_TRACE
(
bp
,
"get_lock"
,
0
);
...
...
@@ -908,7 +908,7 @@ xfs_buf_cond_lock(
{
int
locked
;
locked
=
down_trylock
(
&
bp
->
b_sema
)
==
0
;
locked
=
anon_
down_trylock
(
&
bp
->
b_sema
)
==
0
;
if
(
locked
)
{
XB_SET_OWNER
(
bp
);
}
...
...
@@ -938,7 +938,7 @@ xfs_buf_lock(
XB_TRACE
(
bp
,
"lock"
,
0
);
if
(
atomic_read
(
&
bp
->
b_io_remaining
))
blk_run_address_space
(
bp
->
b_target
->
bt_mapping
);
down
(
&
bp
->
b_sema
);
anon_
down
(
&
bp
->
b_sema
);
XB_SET_OWNER
(
bp
);
XB_TRACE
(
bp
,
"locked"
,
0
);
}
...
...
@@ -961,7 +961,7 @@ xfs_buf_unlock(
}
XB_CLEAR_OWNER
(
bp
);
up
(
&
bp
->
b_sema
);
anon_
up
(
&
bp
->
b_sema
);
XB_TRACE
(
bp
,
"unlock"
,
0
);
}
...
...
fs/xfs/linux-2.6/xfs_buf.h
View file @
14e49046
...
...
@@ -145,7 +145,7 @@ typedef int (*xfs_buf_bdstrat_t)(struct xfs_buf *);
#define XB_PAGES 2
typedef
struct
xfs_buf
{
struct
semaphore
b_sema
;
/* semaphore for lockables */
struct
anon_
semaphore
b_sema
;
/* semaphore for lockables */
unsigned
long
b_queuetime
;
/* time buffer was queued */
atomic_t
b_pin_count
;
/* pin count */
wait_queue_head_t
b_waiters
;
/* unpin waiters */
...
...
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