Commit 6cb1269b authored by Dave Kleikamp's avatar Dave Kleikamp

JFS: Fix sparse warnings, including endian error

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: default avatarDave Kleikamp <shaggy@austin.ibm.com>
parent f3591fff
...@@ -129,8 +129,7 @@ void jfs_delete_inode(struct inode *inode) ...@@ -129,8 +129,7 @@ void jfs_delete_inode(struct inode *inode)
jfs_info("In jfs_delete_inode, inode = 0x%p", inode); jfs_info("In jfs_delete_inode, inode = 0x%p", inode);
if (!is_bad_inode(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); truncate_inode_pages(&inode->i_data, 0);
if (test_cflag(COMMIT_Freewmap, inode)) if (test_cflag(COMMIT_Freewmap, inode))
......
...@@ -3055,7 +3055,7 @@ static int cntlz(u32 value) ...@@ -3055,7 +3055,7 @@ static int cntlz(u32 value)
* RETURN VALUES: * RETURN VALUES:
* log2 number of blocks * log2 number of blocks
*/ */
int blkstol2(s64 nb) static int blkstol2(s64 nb)
{ {
int l2nb; int l2nb;
s64 mask; /* meant to be signed */ s64 mask; /* meant to be signed */
......
...@@ -2070,8 +2070,8 @@ static void xtLog(struct jfs_log * log, struct tblock * tblk, struct lrd * lrd, ...@@ -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; * function: log from maplock of freed data extents;
*/ */
void mapLog(struct jfs_log * log, struct tblock * tblk, struct lrd * lrd, static void mapLog(struct jfs_log * log, struct tblock * tblk, struct lrd * lrd,
struct tlock * tlck) struct tlock * tlck)
{ {
struct pxd_lock *pxdlock; struct pxd_lock *pxdlock;
int i, nlock; int i, nlock;
...@@ -2209,7 +2209,7 @@ void txEA(tid_t tid, struct inode *ip, dxd_t * oldea, dxd_t * newea) ...@@ -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 * function: synchronously write pages locked by transaction
* after txLog() but before txUpdateMap(); * after txLog() but before txUpdateMap();
*/ */
void txForce(struct tblock * tblk) static void txForce(struct tblock * tblk)
{ {
struct tlock *tlck; struct tlock *tlck;
lid_t lid, next; lid_t lid, next;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment