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
a8725300
Commit
a8725300
authored
Mar 12, 2003
by
Dave Blaschke
Committed by
Linus Torvalds
Mar 12, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Code cleanup suggested by static analysis tool.
parent
236b5445
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
6 additions
and
18 deletions
+6
-18
fs/jfs/jfs_dtree.c
fs/jfs/jfs_dtree.c
+0
-4
fs/jfs/jfs_extent.c
fs/jfs/jfs_extent.c
+1
-4
fs/jfs/jfs_imap.c
fs/jfs/jfs_imap.c
+3
-4
fs/jfs/jfs_txnmgr.c
fs/jfs/jfs_txnmgr.c
+1
-4
fs/jfs/jfs_xtree.c
fs/jfs/jfs_xtree.c
+1
-2
No files found.
fs/jfs/jfs_dtree.c
View file @
a8725300
...
@@ -2978,7 +2978,6 @@ int jfs_readdir(struct file *filp, void *dirent, filldir_t filldir)
...
@@ -2978,7 +2978,6 @@ int jfs_readdir(struct file *filp, void *dirent, filldir_t filldir)
int
d_namleft
,
len
,
outlen
;
int
d_namleft
,
len
,
outlen
;
unsigned
long
dirent_buf
;
unsigned
long
dirent_buf
;
char
*
name_ptr
;
char
*
name_ptr
;
int
dtlhdrdatalen
;
u32
dir_index
;
u32
dir_index
;
int
do_index
=
0
;
int
do_index
=
0
;
uint
loop_count
=
0
;
uint
loop_count
=
0
;
...
@@ -2998,7 +2997,6 @@ int jfs_readdir(struct file *filp, void *dirent, filldir_t filldir)
...
@@ -2998,7 +2997,6 @@ int jfs_readdir(struct file *filp, void *dirent, filldir_t filldir)
* -1 = End of directory
* -1 = End of directory
*/
*/
do_index
=
1
;
do_index
=
1
;
dtlhdrdatalen
=
DTLHDRDATALEN
;
dir_index
=
(
u32
)
filp
->
f_pos
;
dir_index
=
(
u32
)
filp
->
f_pos
;
...
@@ -3083,8 +3081,6 @@ int jfs_readdir(struct file *filp, void *dirent, filldir_t filldir)
...
@@ -3083,8 +3081,6 @@ int jfs_readdir(struct file *filp, void *dirent, filldir_t filldir)
* pn > 0: Real entries, pn=1 -> leftmost page
* pn > 0: Real entries, pn=1 -> leftmost page
* pn = index = -1: No more entries
* pn = index = -1: No more entries
*/
*/
dtlhdrdatalen
=
DTLHDRDATALEN_LEGACY
;
dtpos
=
filp
->
f_pos
;
dtpos
=
filp
->
f_pos
;
if
(
dtpos
==
0
)
{
if
(
dtpos
==
0
)
{
/* build "." entry */
/* build "." entry */
...
...
fs/jfs/jfs_extent.c
View file @
a8725300
...
@@ -91,7 +91,7 @@ extAlloc(struct inode *ip, s64 xlen, s64 pno, xad_t * xp, boolean_t abnr)
...
@@ -91,7 +91,7 @@ extAlloc(struct inode *ip, s64 xlen, s64 pno, xad_t * xp, boolean_t abnr)
{
{
struct
jfs_sb_info
*
sbi
=
JFS_SBI
(
ip
->
i_sb
);
struct
jfs_sb_info
*
sbi
=
JFS_SBI
(
ip
->
i_sb
);
s64
nxlen
,
nxaddr
,
xoff
,
hint
,
xaddr
=
0
;
s64
nxlen
,
nxaddr
,
xoff
,
hint
,
xaddr
=
0
;
int
rc
,
nbperpage
;
int
rc
;
int
xflag
;
int
xflag
;
/* This blocks if we are low on resources */
/* This blocks if we are low on resources */
...
@@ -104,9 +104,6 @@ extAlloc(struct inode *ip, s64 xlen, s64 pno, xad_t * xp, boolean_t abnr)
...
@@ -104,9 +104,6 @@ extAlloc(struct inode *ip, s64 xlen, s64 pno, xad_t * xp, boolean_t abnr)
if
(
xlen
>
MAXXLEN
)
if
(
xlen
>
MAXXLEN
)
xlen
=
MAXXLEN
;
xlen
=
MAXXLEN
;
/* get the number of blocks per page */
nbperpage
=
sbi
->
nbperpage
;
/* get the page's starting extent offset */
/* get the page's starting extent offset */
xoff
=
pno
<<
sbi
->
l2nbperpage
;
xoff
=
pno
<<
sbi
->
l2nbperpage
;
...
...
fs/jfs/jfs_imap.c
View file @
a8725300
...
@@ -2966,7 +2966,6 @@ static void duplicateIXtree(struct super_block *sb, s64 blkno,
...
@@ -2966,7 +2966,6 @@ static void duplicateIXtree(struct super_block *sb, s64 blkno,
struct
buffer_head
*
bh
;
struct
buffer_head
*
bh
;
struct
inode
*
ip
;
struct
inode
*
ip
;
tid_t
tid
;
tid_t
tid
;
int
rc
;
/* if AIT2 ipmap2 is bad, do not try to update it */
/* if AIT2 ipmap2 is bad, do not try to update it */
if
(
JFS_SBI
(
sb
)
->
mntflag
&
JFS_BAD_SAIT
)
/* s_flag */
if
(
JFS_SBI
(
sb
)
->
mntflag
&
JFS_BAD_SAIT
)
/* s_flag */
...
@@ -2974,7 +2973,7 @@ static void duplicateIXtree(struct super_block *sb, s64 blkno,
...
@@ -2974,7 +2973,7 @@ static void duplicateIXtree(struct super_block *sb, s64 blkno,
ip
=
diReadSpecial
(
sb
,
FILESYSTEM_I
,
1
);
ip
=
diReadSpecial
(
sb
,
FILESYSTEM_I
,
1
);
if
(
ip
==
NULL
)
{
if
(
ip
==
NULL
)
{
JFS_SBI
(
sb
)
->
mntflag
|=
JFS_BAD_SAIT
;
JFS_SBI
(
sb
)
->
mntflag
|=
JFS_BAD_SAIT
;
if
(
(
rc
=
readSuper
(
sb
,
&
bh
)
))
if
(
readSuper
(
sb
,
&
bh
))
return
;
return
;
j_sb
=
(
struct
jfs_superblock
*
)
bh
->
b_data
;
j_sb
=
(
struct
jfs_superblock
*
)
bh
->
b_data
;
j_sb
->
s_flag
|=
JFS_BAD_SAIT
;
j_sb
->
s_flag
|=
JFS_BAD_SAIT
;
...
@@ -2988,7 +2987,7 @@ static void duplicateIXtree(struct super_block *sb, s64 blkno,
...
@@ -2988,7 +2987,7 @@ static void duplicateIXtree(struct super_block *sb, s64 blkno,
/* start transaction */
/* start transaction */
tid
=
txBegin
(
sb
,
COMMIT_FORCE
);
tid
=
txBegin
(
sb
,
COMMIT_FORCE
);
/* update the inode map addressing structure to point to it */
/* update the inode map addressing structure to point to it */
if
(
(
rc
=
xtInsert
(
tid
,
ip
,
0
,
blkno
,
xlen
,
xaddr
,
0
)
))
{
if
(
xtInsert
(
tid
,
ip
,
0
,
blkno
,
xlen
,
xaddr
,
0
))
{
JFS_SBI
(
sb
)
->
mntflag
|=
JFS_BAD_SAIT
;
JFS_SBI
(
sb
)
->
mntflag
|=
JFS_BAD_SAIT
;
txAbort
(
tid
,
1
);
txAbort
(
tid
,
1
);
goto
cleanup
;
goto
cleanup
;
...
@@ -2997,7 +2996,7 @@ static void duplicateIXtree(struct super_block *sb, s64 blkno,
...
@@ -2997,7 +2996,7 @@ static void duplicateIXtree(struct super_block *sb, s64 blkno,
/* update the inode map's inode to reflect the extension */
/* update the inode map's inode to reflect the extension */
ip
->
i_size
+=
PSIZE
;
ip
->
i_size
+=
PSIZE
;
ip
->
i_blocks
+=
LBLK2PBLK
(
sb
,
xlen
);
ip
->
i_blocks
+=
LBLK2PBLK
(
sb
,
xlen
);
rc
=
txCommit
(
tid
,
1
,
&
ip
,
COMMIT_FORCE
);
txCommit
(
tid
,
1
,
&
ip
,
COMMIT_FORCE
);
cleanup:
cleanup:
txEnd
(
tid
);
txEnd
(
tid
);
diFreeSpecial
(
ip
);
diFreeSpecial
(
ip
);
...
...
fs/jfs/jfs_txnmgr.c
View file @
a8725300
...
@@ -1551,12 +1551,10 @@ int dataLog(struct jfs_log * log, struct tblock * tblk, struct lrd * lrd,
...
@@ -1551,12 +1551,10 @@ int dataLog(struct jfs_log * log, struct tblock * tblk, struct lrd * lrd,
void
dtLog
(
struct
jfs_log
*
log
,
struct
tblock
*
tblk
,
struct
lrd
*
lrd
,
void
dtLog
(
struct
jfs_log
*
log
,
struct
tblock
*
tblk
,
struct
lrd
*
lrd
,
struct
tlock
*
tlck
)
struct
tlock
*
tlck
)
{
{
struct
inode
*
ip
;
struct
metapage
*
mp
;
struct
metapage
*
mp
;
struct
pxd_lock
*
pxdlock
;
struct
pxd_lock
*
pxdlock
;
pxd_t
*
pxd
;
pxd_t
*
pxd
;
ip
=
tlck
->
ip
;
mp
=
tlck
->
mp
;
mp
=
tlck
->
mp
;
/* initialize as REDOPAGE/NOREDOPAGE record format */
/* initialize as REDOPAGE/NOREDOPAGE record format */
...
@@ -2892,7 +2890,6 @@ void txQuiesce(struct super_block *sb)
...
@@ -2892,7 +2890,6 @@ void txQuiesce(struct super_block *sb)
struct
inode
*
ip
;
struct
inode
*
ip
;
struct
jfs_inode_info
*
jfs_ip
;
struct
jfs_inode_info
*
jfs_ip
;
struct
jfs_log
*
log
=
JFS_SBI
(
sb
)
->
log
;
struct
jfs_log
*
log
=
JFS_SBI
(
sb
)
->
log
;
int
rc
;
tid_t
tid
;
tid_t
tid
;
set_bit
(
log_QUIESCE
,
&
log
->
flag
);
set_bit
(
log_QUIESCE
,
&
log
->
flag
);
...
@@ -2912,7 +2909,7 @@ void txQuiesce(struct super_block *sb)
...
@@ -2912,7 +2909,7 @@ void txQuiesce(struct super_block *sb)
TXN_UNLOCK
();
TXN_UNLOCK
();
tid
=
txBegin
(
ip
->
i_sb
,
COMMIT_INODE
|
COMMIT_FORCE
);
tid
=
txBegin
(
ip
->
i_sb
,
COMMIT_INODE
|
COMMIT_FORCE
);
down
(
&
jfs_ip
->
commit_sem
);
down
(
&
jfs_ip
->
commit_sem
);
rc
=
txCommit
(
tid
,
1
,
&
ip
,
0
);
txCommit
(
tid
,
1
,
&
ip
,
0
);
txEnd
(
tid
);
txEnd
(
tid
);
up
(
&
jfs_ip
->
commit_sem
);
up
(
&
jfs_ip
->
commit_sem
);
/*
/*
...
...
fs/jfs/jfs_xtree.c
View file @
a8725300
...
@@ -3268,14 +3268,13 @@ static int xtRelink(tid_t tid, struct inode *ip, xtpage_t * p)
...
@@ -3268,14 +3268,13 @@ static int xtRelink(tid_t tid, struct inode *ip, xtpage_t * p)
void
xtInitRoot
(
tid_t
tid
,
struct
inode
*
ip
)
void
xtInitRoot
(
tid_t
tid
,
struct
inode
*
ip
)
{
{
xtpage_t
*
p
;
xtpage_t
*
p
;
struct
tlock
*
tlck
;
/*
/*
* acquire a transaction lock on the root
* acquire a transaction lock on the root
*
*
* action:
* action:
*/
*/
t
lck
=
t
xLock
(
tid
,
ip
,
(
struct
metapage
*
)
&
JFS_IP
(
ip
)
->
bxflag
,
txLock
(
tid
,
ip
,
(
struct
metapage
*
)
&
JFS_IP
(
ip
)
->
bxflag
,
tlckXTREE
|
tlckNEW
);
tlckXTREE
|
tlckNEW
);
p
=
&
JFS_IP
(
ip
)
->
i_xtroot
;
p
=
&
JFS_IP
(
ip
)
->
i_xtroot
;
...
...
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