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
78330667
Commit
78330667
authored
Sep 27, 2002
by
Christoph Hellwig
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
XFS: XFS: Make pagebuf use the generic xfs ASSERT() instead of it's own assert()
Modid: 2.5.x-xfs:slinx:127736a
parent
6cd43d77
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
21 deletions
+13
-21
fs/xfs/pagebuf/page_buf.c
fs/xfs/pagebuf/page_buf.c
+7
-5
fs/xfs/pagebuf/page_buf_internal.h
fs/xfs/pagebuf/page_buf_internal.h
+0
-12
fs/xfs/pagebuf/page_buf_locking.c
fs/xfs/pagebuf/page_buf_locking.c
+6
-4
No files found.
fs/xfs/pagebuf/page_buf.c
View file @
78330667
...
...
@@ -58,7 +58,9 @@
#include <linux/sysctl.h>
#include <linux/proc_fs.h>
#include <support/debug.h>
#include <support/kmem.h>
#include "page_buf_internal.h"
#define SECTOR_SHIFT 9
...
...
@@ -547,8 +549,8 @@ _pagebuf_lookup_pages(
}
else
if
(
!
PagePrivate
(
page
))
{
unsigned
long
i
,
range
=
(
offset
+
nbytes
)
>>
SECTOR_SHIFT
;
assert
(
blocksize
<
PAGE_CACHE_SIZE
);
assert
(
!
(
pb
->
pb_flags
&
_PBF_PRIVATE_BH
));
ASSERT
(
blocksize
<
PAGE_CACHE_SIZE
);
ASSERT
(
!
(
pb
->
pb_flags
&
_PBF_PRIVATE_BH
));
/*
* In this case page->private holds a bitmap
* of uptodate sectors (512) within the page
...
...
@@ -1316,8 +1318,8 @@ bio_end_io_pagebuf(
}
else
if
(
!
PagePrivate
(
page
))
{
unsigned
int
j
,
range
;
assert
(
blocksize
<
PAGE_CACHE_SIZE
);
assert
(
!
(
pb
->
pb_flags
&
_PBF_PRIVATE_BH
));
ASSERT
(
blocksize
<
PAGE_CACHE_SIZE
);
ASSERT
(
!
(
pb
->
pb_flags
&
_PBF_PRIVATE_BH
));
range
=
(
bvec
->
bv_offset
+
bvec
->
bv_len
)
>>
SECTOR_SHIFT
;
for
(
j
=
bvec
->
bv_offset
>>
SECTOR_SHIFT
;
j
<
range
;
j
++
)
...
...
@@ -1606,7 +1608,7 @@ pagebuf_iomove(
while
(
cboff
<
boff
)
{
pagebuf_segment
(
pb
,
&
cboff
,
&
page
,
&
cpoff
,
&
csize
);
assert
(((
csize
+
cpoff
)
<=
PAGE_CACHE_SIZE
));
ASSERT
(((
csize
+
cpoff
)
<=
PAGE_CACHE_SIZE
));
switch
(
mode
)
{
case
PBRW_ZERO
:
...
...
fs/xfs/pagebuf/page_buf_internal.h
View file @
78330667
...
...
@@ -151,18 +151,6 @@ extern struct pbstats pbstats;
#define PB_STATS_INC(count) ( count ++ )
#undef assert
#ifdef PAGEBUF_DEBUG
# define assert(expr) \
if (!(expr)) { \
printk("Assertion failed: %s\n%s::%s line %d\n",\
#expr,__FILE__,__FUNCTION__,__LINE__); \
BUG(); \
}
#else
# define assert(x) do { } while (0)
#endif
#ifndef STATIC
# define STATIC static
#endif
...
...
fs/xfs/pagebuf/page_buf_locking.c
View file @
78330667
...
...
@@ -54,6 +54,8 @@
#include <linux/init.h>
#include <linux/major.h>
#include <support/debug.h>
#include "page_buf_internal.h"
#ifndef EVMS_MAJOR
...
...
@@ -76,7 +78,7 @@ pagebuf_cond_lock( /* lock buffer, if not locked */
{
int
locked
;
assert
(
pb
->
pb_flags
&
_PBF_LOCKABLE
);
ASSERT
(
pb
->
pb_flags
&
_PBF_LOCKABLE
);
locked
=
down_trylock
(
&
PBP
(
pb
)
->
pb_sema
)
==
0
;
if
(
locked
)
{
...
...
@@ -97,7 +99,7 @@ int
pagebuf_lock_value
(
page_buf_t
*
pb
)
{
assert
(
pb
->
pb_flags
&
_PBF_LOCKABLE
);
ASSERT
(
pb
->
pb_flags
&
_PBF_LOCKABLE
);
return
(
atomic_read
(
&
PBP
(
pb
)
->
pb_sema
.
count
));
}
...
...
@@ -113,7 +115,7 @@ int
pagebuf_lock
(
page_buf_t
*
pb
)
{
assert
(
pb
->
pb_flags
&
_PBF_LOCKABLE
);
ASSERT
(
pb
->
pb_flags
&
_PBF_LOCKABLE
);
PB_TRACE
(
pb
,
PB_TRACE_REC
(
lock
),
0
);
if
(
atomic_read
(
&
PBP
(
pb
)
->
pb_io_remaining
))
...
...
@@ -219,7 +221,7 @@ void
pagebuf_unlock
(
/* unlock buffer */
page_buf_t
*
pb
)
/* buffer to unlock */
{
assert
(
pb
->
pb_flags
&
_PBF_LOCKABLE
);
ASSERT
(
pb
->
pb_flags
&
_PBF_LOCKABLE
);
PB_CLEAR_OWNER
(
pb
);
up
(
&
PBP
(
pb
)
->
pb_sema
);
PB_TRACE
(
pb
,
PB_TRACE_REC
(
unlock
),
0
);
...
...
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