Skip to content

Commit

Permalink
JFS: Fix sparse warnings, including endian error
Browse files Browse the repository at this point in the history
The fix in inode.c is a real bug.  It could result in undeleted, yet
unconnected files on big-endian hardware.

The others are trivial.

Signed-off-by: Dave Kleikamp <shaggy@austin.ibm.com>
  • Loading branch information
Dave Kleikamp committed Sep 16, 2005
1 parent f3591ff commit 6cb1269
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
3 changes: 1 addition & 2 deletions fs/jfs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,7 @@ void jfs_delete_inode(struct inode *inode)
jfs_info("In jfs_delete_inode, inode = 0x%p", inode);

if (!is_bad_inode(inode) &&
(JFS_IP(inode)->fileset == cpu_to_le32(FILESYSTEM_I))) {

(JFS_IP(inode)->fileset == FILESYSTEM_I)) {
truncate_inode_pages(&inode->i_data, 0);

if (test_cflag(COMMIT_Freewmap, inode))
Expand Down
2 changes: 1 addition & 1 deletion fs/jfs/jfs_dmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -3055,7 +3055,7 @@ static int cntlz(u32 value)
* RETURN VALUES:
* log2 number of blocks
*/
int blkstol2(s64 nb)
static int blkstol2(s64 nb)
{
int l2nb;
s64 mask; /* meant to be signed */
Expand Down
6 changes: 3 additions & 3 deletions fs/jfs/jfs_txnmgr.c
Original file line number Diff line number Diff line change
Expand Up @@ -2070,8 +2070,8 @@ static void xtLog(struct jfs_log * log, struct tblock * tblk, struct lrd * lrd,
*
* function: log from maplock of freed data extents;
*/
void mapLog(struct jfs_log * log, struct tblock * tblk, struct lrd * lrd,
struct tlock * tlck)
static void mapLog(struct jfs_log * log, struct tblock * tblk, struct lrd * lrd,
struct tlock * tlck)
{
struct pxd_lock *pxdlock;
int i, nlock;
Expand Down Expand Up @@ -2209,7 +2209,7 @@ void txEA(tid_t tid, struct inode *ip, dxd_t * oldea, dxd_t * newea)
* function: synchronously write pages locked by transaction
* after txLog() but before txUpdateMap();
*/
void txForce(struct tblock * tblk)
static void txForce(struct tblock * tblk)
{
struct tlock *tlck;
lid_t lid, next;
Expand Down

0 comments on commit 6cb1269

Please sign in to comment.