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
f4defcee
Commit
f4defcee
authored
Jul 17, 2003
by
Dave Kleikamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
JFS: Missed some non-negative error return codes
parent
eb40c469
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
12 additions
and
13 deletions
+12
-13
fs/jfs/inode.c
fs/jfs/inode.c
+1
-1
fs/jfs/jfs_dtree.c
fs/jfs/jfs_dtree.c
+1
-1
fs/jfs/jfs_logmgr.c
fs/jfs/jfs_logmgr.c
+1
-1
fs/jfs/jfs_txnmgr.c
fs/jfs/jfs_txnmgr.c
+4
-5
fs/jfs/namei.c
fs/jfs/namei.c
+5
-5
No files found.
fs/jfs/inode.c
View file @
f4defcee
...
...
@@ -105,7 +105,7 @@ int jfs_commit_inode(struct inode *inode, int wait)
rc
=
txCommit
(
tid
,
1
,
&
inode
,
wait
?
COMMIT_SYNC
:
0
);
txEnd
(
tid
);
up
(
&
JFS_IP
(
inode
)
->
commit_sem
);
return
-
rc
;
return
rc
;
}
void
jfs_write_inode
(
struct
inode
*
inode
,
int
wait
)
...
...
fs/jfs/jfs_dtree.c
View file @
f4defcee
...
...
@@ -1328,7 +1328,7 @@ static int dtSplitPage(tid_t tid, struct inode *ip, struct dtsplit * split,
rbn
=
addressPXD
(
pxd
);
rmp
=
get_metapage
(
ip
,
rbn
,
PSIZE
,
1
);
if
(
rmp
==
NULL
)
return
EIO
;
return
-
EIO
;
jfs_info
(
"dtSplitPage: ip:0x%p smp:0x%p rmp:0x%p"
,
ip
,
smp
,
rmp
);
...
...
fs/jfs/jfs_logmgr.c
View file @
f4defcee
...
...
@@ -1615,7 +1615,7 @@ static int lmLogFileSystem(struct jfs_log * log, char *uuid, int activate)
if
(
i
==
MAX_ACTIVE
)
{
jfs_warn
(
"Too many file systems sharing journal!"
);
lbmFree
(
bpsuper
);
return
EMFILE
;
/* Is there a better rc? */
return
-
EMFILE
;
/* Is there a better rc? */
}
}
else
{
for
(
i
=
0
;
i
<
MAX_ACTIVE
;
i
++
)
...
...
fs/jfs/jfs_txnmgr.c
View file @
f4defcee
...
...
@@ -178,7 +178,7 @@ void inlineLog(struct jfs_log * log, struct tblock * tblk, struct lrd * lrd,
struct
tlock
*
tlck
);
void
mapLog
(
struct
jfs_log
*
log
,
struct
tblock
*
tblk
,
struct
lrd
*
lrd
,
struct
tlock
*
tlck
);
void
txAbortCommit
(
struct
commit
*
cd
,
int
exval
);
static
void
txAbortCommit
(
struct
commit
*
cd
);
static
void
txAllocPMap
(
struct
inode
*
ip
,
struct
maplock
*
maplock
,
struct
tblock
*
tblk
);
void
txForce
(
struct
tblock
*
tblk
);
...
...
@@ -1113,7 +1113,7 @@ int txCommit(tid_t tid, /* transaction identifier */
jfs_info
(
"txCommit, tid = %d, flag = %d"
,
tid
,
flag
);
/* is read-only file system ? */
if
(
isReadOnly
(
iplist
[
0
]))
{
rc
=
EROFS
;
rc
=
-
EROFS
;
goto
TheEnd
;
}
...
...
@@ -1317,7 +1317,7 @@ int txCommit(tid_t tid, /* transaction identifier */
out:
if
(
rc
!=
0
)
txAbortCommit
(
&
cd
,
rc
);
txAbortCommit
(
&
cd
);
TheEnd:
jfs_info
(
"txCommit: tid = %d, returning %d"
,
tid
,
rc
);
...
...
@@ -2672,14 +2672,13 @@ void txAbort(tid_t tid, int dirty)
* log age of page-frames in memory for which caller has
* are reset to 0 (to avoid logwarap).
*/
void
txAbortCommit
(
struct
commit
*
cd
,
int
exval
)
static
void
txAbortCommit
(
struct
commit
*
cd
)
{
struct
tblock
*
tblk
;
tid_t
tid
;
lid_t
lid
,
next
;
struct
metapage
*
mp
;
assert
(
exval
==
EIO
||
exval
==
ENOMEM
);
jfs_warn
(
"txAbortCommit: cd:0x%p"
,
cd
);
/*
...
...
fs/jfs/namei.c
View file @
f4defcee
...
...
@@ -120,7 +120,7 @@ int jfs_create(struct inode *dip, struct dentry *dentry, int mode,
ino
=
ip
->
i_ino
;
if
((
rc
=
dtInsert
(
tid
,
dip
,
&
dname
,
&
ino
,
&
btstack
)))
{
jfs_err
(
"jfs_create: dtInsert returned %d"
,
rc
);
if
(
rc
==
EIO
)
if
(
rc
==
-
EIO
)
txAbort
(
tid
,
1
);
/* Marks Filesystem dirty */
else
txAbort
(
tid
,
0
);
/* Filesystem full */
...
...
@@ -247,7 +247,7 @@ int jfs_mkdir(struct inode *dip, struct dentry *dentry, int mode)
if
((
rc
=
dtInsert
(
tid
,
dip
,
&
dname
,
&
ino
,
&
btstack
)))
{
jfs_err
(
"jfs_mkdir: dtInsert returned %d"
,
rc
);
if
(
rc
==
EIO
)
if
(
rc
==
-
EIO
)
txAbort
(
tid
,
1
);
/* Marks Filesystem dirty */
else
txAbort
(
tid
,
0
);
/* Filesystem full */
...
...
@@ -353,7 +353,7 @@ int jfs_rmdir(struct inode *dip, struct dentry *dentry)
ino
=
ip
->
i_ino
;
if
((
rc
=
dtDelete
(
tid
,
dip
,
&
dname
,
&
ino
,
JFS_REMOVE
)))
{
jfs_err
(
"jfs_rmdir: dtDelete returned %d"
,
rc
);
if
(
rc
==
EIO
)
if
(
rc
==
-
EIO
)
txAbort
(
tid
,
1
);
txEnd
(
tid
);
up
(
&
JFS_IP
(
dip
)
->
commit_sem
);
...
...
@@ -469,7 +469,7 @@ int jfs_unlink(struct inode *dip, struct dentry *dentry)
ino
=
ip
->
i_ino
;
if
((
rc
=
dtDelete
(
tid
,
dip
,
&
dname
,
&
ino
,
JFS_REMOVE
)))
{
jfs_err
(
"jfs_unlink: dtDelete returned %d"
,
rc
);
if
(
rc
==
EIO
)
if
(
rc
==
-
EIO
)
txAbort
(
tid
,
1
);
/* Marks FS Dirty */
txEnd
(
tid
);
up
(
&
JFS_IP
(
dip
)
->
commit_sem
);
...
...
@@ -535,7 +535,7 @@ int jfs_unlink(struct inode *dip, struct dentry *dentry)
new_size
=
xtTruncate_pmap
(
tid
,
ip
,
new_size
);
if
(
new_size
<
0
)
{
txAbort
(
tid
,
1
);
/* Marks FS Dirty */
rc
=
-
new_size
;
/* We return -rc */
rc
=
new_size
;
}
else
rc
=
txCommit
(
tid
,
2
,
&
iplist
[
0
],
COMMIT_SYNC
);
txEnd
(
tid
);
...
...
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