Commit 8319ca6a authored by Alexander Viro's avatar Alexander Viro Committed by Linus Torvalds

[PATCH] sparse: NULL noise in jfs

parent be6cdf41
...@@ -259,19 +259,19 @@ static struct dir_table_slot *find_index(struct inode *ip, u32 index, ...@@ -259,19 +259,19 @@ static struct dir_table_slot *find_index(struct inode *ip, u32 index,
jfs_warn("find_entry called with index = %d", index); jfs_warn("find_entry called with index = %d", index);
maxWarnings--; maxWarnings--;
} }
return 0; return NULL;
} }
if (index >= jfs_ip->next_index) { if (index >= jfs_ip->next_index) {
jfs_warn("find_entry called with index >= next_index"); jfs_warn("find_entry called with index >= next_index");
return 0; return NULL;
} }
if (jfs_ip->next_index <= (MAX_INLINE_DIRTABLE_ENTRY + 1)) { if (jfs_ip->next_index <= (MAX_INLINE_DIRTABLE_ENTRY + 1)) {
/* /*
* Inline directory table * Inline directory table
*/ */
*mp = 0; *mp = NULL;
slot = &jfs_ip->i_dirtable[index - 2]; slot = &jfs_ip->i_dirtable[index - 2];
} else { } else {
offset = (index - 2) * sizeof(struct dir_table_slot); offset = (index - 2) * sizeof(struct dir_table_slot);
...@@ -281,7 +281,7 @@ static struct dir_table_slot *find_index(struct inode *ip, u32 index, ...@@ -281,7 +281,7 @@ static struct dir_table_slot *find_index(struct inode *ip, u32 index,
if (*mp && (*lblock != blkno)) { if (*mp && (*lblock != blkno)) {
release_metapage(*mp); release_metapage(*mp);
*mp = 0; *mp = NULL;
} }
if (*mp == 0) { if (*mp == 0) {
*lblock = blkno; *lblock = blkno;
...@@ -289,7 +289,7 @@ static struct dir_table_slot *find_index(struct inode *ip, u32 index, ...@@ -289,7 +289,7 @@ static struct dir_table_slot *find_index(struct inode *ip, u32 index,
} }
if (*mp == 0) { if (*mp == 0) {
jfs_err("free_index: error reading directory table"); jfs_err("free_index: error reading directory table");
return 0; return NULL;
} }
slot = slot =
...@@ -490,7 +490,7 @@ static void free_index(tid_t tid, struct inode *ip, u32 index, u32 next) ...@@ -490,7 +490,7 @@ static void free_index(tid_t tid, struct inode *ip, u32 index, u32 next)
{ {
struct dir_table_slot *dirtab_slot; struct dir_table_slot *dirtab_slot;
s64 lblock; s64 lblock;
struct metapage *mp = 0; struct metapage *mp = NULL;
dirtab_slot = find_index(ip, index, &mp, &lblock); dirtab_slot = find_index(ip, index, &mp, &lblock);
...@@ -543,7 +543,7 @@ static int read_index(struct inode *ip, u32 index, ...@@ -543,7 +543,7 @@ static int read_index(struct inode *ip, u32 index,
struct dir_table_slot * dirtab_slot) struct dir_table_slot * dirtab_slot)
{ {
s64 lblock; s64 lblock;
struct metapage *mp = 0; struct metapage *mp = NULL;
struct dir_table_slot *slot; struct dir_table_slot *slot;
slot = find_index(ip, index, &mp, &lblock); slot = find_index(ip, index, &mp, &lblock);
...@@ -850,7 +850,7 @@ int dtInsert(tid_t tid, struct inode *ip, ...@@ -850,7 +850,7 @@ int dtInsert(tid_t tid, struct inode *ip,
data.leaf.ip = ip; data.leaf.ip = ip;
} else { } else {
n = NDTLEAF_LEGACY(name->namlen); n = NDTLEAF_LEGACY(name->namlen);
data.leaf.ip = 0; /* signifies legacy directory format */ data.leaf.ip = NULL; /* signifies legacy directory format */
} }
data.leaf.ino = cpu_to_le32(*fsn); data.leaf.ino = cpu_to_le32(*fsn);
...@@ -940,7 +940,7 @@ static int dtSplitUp(tid_t tid, ...@@ -940,7 +940,7 @@ static int dtSplitUp(tid_t tid,
int xlen, xsize; int xlen, xsize;
struct pxdlist pxdlist; struct pxdlist pxdlist;
pxd_t *pxd; pxd_t *pxd;
struct component_name key = { 0, 0 }; struct component_name key = { 0, NULL };
ddata_t *data = split->data; ddata_t *data = split->data;
int n; int n;
struct dt_lock *dtlck; struct dt_lock *dtlck;
...@@ -1550,7 +1550,7 @@ static int dtSplitPage(tid_t tid, struct inode *ip, struct dtsplit * split, ...@@ -1550,7 +1550,7 @@ static int dtSplitPage(tid_t tid, struct inode *ip, struct dtsplit * split,
if ((rp->header.flag & BT_LEAF) && DO_INDEX(ip)) { if ((rp->header.flag & BT_LEAF) && DO_INDEX(ip)) {
s64 lblock; s64 lblock;
mp = 0; mp = NULL;
stbl = DT_GETSTBL(rp); stbl = DT_GETSTBL(rp);
for (n = 0; n < rp->header.nextindex; n++) { for (n = 0; n < rp->header.nextindex; n++) {
ldtentry = (struct ldtentry *) & rp->slot[stbl[n]]; ldtentry = (struct ldtentry *) & rp->slot[stbl[n]];
...@@ -1676,7 +1676,7 @@ static int dtExtendPage(tid_t tid, ...@@ -1676,7 +1676,7 @@ static int dtExtendPage(tid_t tid,
if (DO_INDEX(ip)) { if (DO_INDEX(ip)) {
s64 lblock; s64 lblock;
mp = 0; mp = NULL;
stbl = DT_GETSTBL(sp); stbl = DT_GETSTBL(sp);
for (n = 0; n < sp->header.nextindex; n++) { for (n = 0; n < sp->header.nextindex; n++) {
ldtentry = ldtentry =
...@@ -1970,7 +1970,7 @@ static int dtSplitRoot(tid_t tid, ...@@ -1970,7 +1970,7 @@ static int dtSplitRoot(tid_t tid,
*/ */
if ((rp->header.flag & BT_LEAF) && DO_INDEX(ip)) { if ((rp->header.flag & BT_LEAF) && DO_INDEX(ip)) {
s64 lblock; s64 lblock;
struct metapage *mp = 0; struct metapage *mp = NULL;
struct ldtentry *ldtentry; struct ldtentry *ldtentry;
stbl = DT_GETSTBL(rp); stbl = DT_GETSTBL(rp);
...@@ -2181,7 +2181,7 @@ int dtDelete(tid_t tid, ...@@ -2181,7 +2181,7 @@ int dtDelete(tid_t tid,
if (DO_INDEX(ip) && index < p->header.nextindex) { if (DO_INDEX(ip) && index < p->header.nextindex) {
s64 lblock; s64 lblock;
imp = 0; imp = NULL;
stbl = DT_GETSTBL(p); stbl = DT_GETSTBL(p);
for (i = index; i < p->header.nextindex; i++) { for (i = index; i < p->header.nextindex; i++) {
ldtentry = ldtentry =
...@@ -3873,8 +3873,8 @@ static void dtInsertEntry(dtpage_t * p, int index, struct component_name * key, ...@@ -3873,8 +3873,8 @@ static void dtInsertEntry(dtpage_t * p, int index, struct component_name * key,
ddata_t * data, struct dt_lock ** dtlock) ddata_t * data, struct dt_lock ** dtlock)
{ {
struct dtslot *h, *t; struct dtslot *h, *t;
struct ldtentry *lh = 0; struct ldtentry *lh = NULL;
struct idtentry *ih = 0; struct idtentry *ih = NULL;
int hsi, fsi, klen, len, nextindex; int hsi, fsi, klen, len, nextindex;
wchar_t *kname, *name; wchar_t *kname, *name;
s8 *stbl; s8 *stbl;
...@@ -3883,7 +3883,7 @@ static void dtInsertEntry(dtpage_t * p, int index, struct component_name * key, ...@@ -3883,7 +3883,7 @@ static void dtInsertEntry(dtpage_t * p, int index, struct component_name * key,
struct lv *lv; struct lv *lv;
int xsi, n; int xsi, n;
s64 bn = 0; s64 bn = 0;
struct metapage *mp = 0; struct metapage *mp = NULL;
klen = key->namlen; klen = key->namlen;
kname = key->name; kname = key->name;
...@@ -3999,7 +3999,7 @@ static void dtInsertEntry(dtpage_t * p, int index, struct component_name * key, ...@@ -3999,7 +3999,7 @@ static void dtInsertEntry(dtpage_t * p, int index, struct component_name * key,
* Need to update slot number for entries that moved * Need to update slot number for entries that moved
* in the stbl * in the stbl
*/ */
mp = 0; mp = NULL;
for (n = index + 1; n <= nextindex; n++) { for (n = index + 1; n <= nextindex; n++) {
lh = (struct ldtentry *) & (p->slot[stbl[n]]); lh = (struct ldtentry *) & (p->slot[stbl[n]]);
modify_index(data->leaf.tid, data->leaf.ip, modify_index(data->leaf.tid, data->leaf.ip,
...@@ -4035,8 +4035,8 @@ static void dtMoveEntry(dtpage_t * sp, int si, dtpage_t * dp, ...@@ -4035,8 +4035,8 @@ static void dtMoveEntry(dtpage_t * sp, int si, dtpage_t * dp,
int dsi; /* dst slot index */ int dsi; /* dst slot index */
s8 *sstbl, *dstbl; /* sorted entry table */ s8 *sstbl, *dstbl; /* sorted entry table */
int snamlen, len; int snamlen, len;
struct ldtentry *slh, *dlh = 0; struct ldtentry *slh, *dlh = NULL;
struct idtentry *sih, *dih = 0; struct idtentry *sih, *dih = NULL;
struct dtslot *h, *s, *d; struct dtslot *h, *s, *d;
struct dt_lock *sdtlck = *sdtlock, *ddtlck = *ddtlock; struct dt_lock *sdtlck = *sdtlock, *ddtlck = *ddtlock;
struct lv *slv, *dlv; struct lv *slv, *dlv;
......
...@@ -2061,7 +2061,7 @@ static int diAllocBit(struct inomap * imap, struct iag * iagp, int ino) ...@@ -2061,7 +2061,7 @@ static int diAllocBit(struct inomap * imap, struct iag * iagp, int ino)
{ {
int extno, bitno, agno, sword, rc; int extno, bitno, agno, sword, rc;
struct metapage *amp = NULL, *bmp = NULL; struct metapage *amp = NULL, *bmp = NULL;
struct iag *aiagp = 0, *biagp = 0; struct iag *aiagp = NULL, *biagp = NULL;
u32 mask; u32 mask;
/* check if this is the last free inode within the iag. /* check if this is the last free inode within the iag.
...@@ -2207,7 +2207,7 @@ static int diAllocBit(struct inomap * imap, struct iag * iagp, int ino) ...@@ -2207,7 +2207,7 @@ static int diAllocBit(struct inomap * imap, struct iag * iagp, int ino)
static int diNewExt(struct inomap * imap, struct iag * iagp, int extno) static int diNewExt(struct inomap * imap, struct iag * iagp, int extno)
{ {
int agno, iagno, fwd, back, freei = 0, sword, rc; int agno, iagno, fwd, back, freei = 0, sword, rc;
struct iag *aiagp = 0, *biagp = 0, *ciagp = 0; struct iag *aiagp = NULL, *biagp = NULL, *ciagp = NULL;
struct metapage *amp, *bmp, *cmp, *dmp; struct metapage *amp, *bmp, *cmp, *dmp;
struct inode *ipimap; struct inode *ipimap;
s64 blkno, hint; s64 blkno, hint;
...@@ -2910,7 +2910,7 @@ int diExtendFS(struct inode *ipimap, struct inode *ipbmap) ...@@ -2910,7 +2910,7 @@ int diExtendFS(struct inode *ipimap, struct inode *ipbmap)
{ {
int rc, rcx = 0; int rc, rcx = 0;
struct inomap *imap = JFS_IP(ipimap)->i_imap; struct inomap *imap = JFS_IP(ipimap)->i_imap;
struct iag *iagp = 0, *hiagp = 0; struct iag *iagp = NULL, *hiagp = NULL;
struct bmap *mp = JFS_SBI(ipbmap->i_sb)->bmap; struct bmap *mp = JFS_SBI(ipbmap->i_sb)->bmap;
struct metapage *bp, *hbp; struct metapage *bp, *hbp;
int i, n, head; int i, n, head;
......
...@@ -320,7 +320,7 @@ struct metapage *__get_metapage(struct inode *inode, unsigned long lblock, ...@@ -320,7 +320,7 @@ struct metapage *__get_metapage(struct inode *inode, unsigned long lblock,
atomic_set(&mp->nohomeok,0); atomic_set(&mp->nohomeok,0);
mp->mapping = mapping; mp->mapping = mapping;
mp->index = lblock; mp->index = lblock;
mp->page = 0; mp->page = NULL;
mp->logical_size = size; mp->logical_size = size;
add_to_hash(mp, hash_ptr); add_to_hash(mp, hash_ptr);
spin_unlock(&meta_lock); spin_unlock(&meta_lock);
...@@ -465,7 +465,7 @@ void release_metapage(struct metapage * mp) ...@@ -465,7 +465,7 @@ void release_metapage(struct metapage * mp)
set_bit(META_stale, &mp->flag); set_bit(META_stale, &mp->flag);
spin_unlock(&meta_lock); spin_unlock(&meta_lock);
kunmap(mp->page); kunmap(mp->page);
mp->data = 0; mp->data = NULL;
if (test_bit(META_dirty, &mp->flag)) if (test_bit(META_dirty, &mp->flag))
__write_metapage(mp); __write_metapage(mp);
if (test_bit(META_sync, &mp->flag)) { if (test_bit(META_sync, &mp->flag)) {
...@@ -491,7 +491,7 @@ void release_metapage(struct metapage * mp) ...@@ -491,7 +491,7 @@ void release_metapage(struct metapage * mp)
*/ */
log = mp->log; log = mp->log;
LOGSYNC_LOCK(log); LOGSYNC_LOCK(log);
mp->log = 0; mp->log = NULL;
mp->lsn = 0; mp->lsn = 0;
mp->clsn = 0; mp->clsn = 0;
log->count--; log->count--;
......
...@@ -166,7 +166,7 @@ int jfs_mount(struct super_block *sb) ...@@ -166,7 +166,7 @@ int jfs_mount(struct super_block *sb)
} }
} else } else
/* Secondary aggregate inode table is not valid */ /* Secondary aggregate inode table is not valid */
sbi->ipaimap2 = 0; sbi->ipaimap2 = NULL;
/* /*
* mount (the only/single) fileset * mount (the only/single) fileset
......
...@@ -330,9 +330,9 @@ int txInit(void) ...@@ -330,9 +330,9 @@ int txInit(void)
void txExit(void) void txExit(void)
{ {
vfree(TxLock); vfree(TxLock);
TxLock = 0; TxLock = NULL;
vfree(TxBlock); vfree(TxBlock);
TxBlock = 0; TxBlock = NULL;
} }
...@@ -1554,7 +1554,7 @@ static int dataLog(struct jfs_log * log, struct tblock * tblk, struct lrd * lrd, ...@@ -1554,7 +1554,7 @@ static int dataLog(struct jfs_log * log, struct tblock * tblk, struct lrd * lrd,
hold_metapage(mp, 0); hold_metapage(mp, 0);
atomic_dec(&mp->nohomeok); atomic_dec(&mp->nohomeok);
discard_metapage(mp); discard_metapage(mp);
tlck->mp = 0; tlck->mp = NULL;
return 0; return 0;
} }
...@@ -2270,7 +2270,7 @@ static void txUpdateMap(struct tblock * tblk) ...@@ -2270,7 +2270,7 @@ static void txUpdateMap(struct tblock * tblk)
struct pxd_lock pxdlock; struct pxd_lock pxdlock;
int maptype; int maptype;
int k, nlock; int k, nlock;
struct metapage *mp = 0; struct metapage *mp = NULL;
ipimap = JFS_SBI(tblk->sb)->ipimap; ipimap = JFS_SBI(tblk->sb)->ipimap;
...@@ -2358,7 +2358,7 @@ static void txUpdateMap(struct tblock * tblk) ...@@ -2358,7 +2358,7 @@ static void txUpdateMap(struct tblock * tblk)
assert(atomic_read(&mp->nohomeok) == 1); assert(atomic_read(&mp->nohomeok) == 1);
atomic_dec(&mp->nohomeok); atomic_dec(&mp->nohomeok);
discard_metapage(mp); discard_metapage(mp);
tlck->mp = 0; tlck->mp = NULL;
} }
} }
/* /*
......
...@@ -130,5 +130,5 @@ UNICASERANGE UniUpperRange[] = { ...@@ -130,5 +130,5 @@ UNICASERANGE UniUpperRange[] = {
{ 0x0490, 0x04cc, UniCaseRangeU0490 }, { 0x0490, 0x04cc, UniCaseRangeU0490 },
{ 0x1e00, 0x1ffc, UniCaseRangeU1e00 }, { 0x1e00, 0x1ffc, UniCaseRangeU1e00 },
{ 0xff40, 0xff5a, UniCaseRangeUff40 }, { 0xff40, 0xff5a, UniCaseRangeUff40 },
{ 0, 0, 0 } { 0 }
}; };
...@@ -1222,7 +1222,7 @@ xtSplitPage(tid_t tid, struct inode *ip, ...@@ -1222,7 +1222,7 @@ xtSplitPage(tid_t tid, struct inode *ip,
struct pxdlist *pxdlist; struct pxdlist *pxdlist;
pxd_t *pxd; pxd_t *pxd;
struct tlock *tlck; struct tlock *tlck;
struct xtlock *sxtlck = 0, *rxtlck = 0; struct xtlock *sxtlck = NULL, *rxtlck = NULL;
smp = split->mp; smp = split->mp;
sp = XT_PAGE(ip, smp); sp = XT_PAGE(ip, smp);
...@@ -1603,7 +1603,7 @@ int xtExtend(tid_t tid, /* transaction id */ ...@@ -1603,7 +1603,7 @@ int xtExtend(tid_t tid, /* transaction id */
xad_t *xad; xad_t *xad;
s64 xaddr; s64 xaddr;
struct tlock *tlck; struct tlock *tlck;
struct xtlock *xtlck = 0; struct xtlock *xtlck = NULL;
int rootsplit = 0; int rootsplit = 0;
jfs_info("xtExtend: nxoff:0x%lx nxlen:0x%x", (ulong) xoff, xlen); jfs_info("xtExtend: nxoff:0x%lx nxlen:0x%x", (ulong) xoff, xlen);
...@@ -1957,7 +1957,7 @@ int xtUpdate(tid_t tid, struct inode *ip, xad_t * nxad) ...@@ -1957,7 +1957,7 @@ int xtUpdate(tid_t tid, struct inode *ip, xad_t * nxad)
int nxlen, xlen, lxlen, rxlen; int nxlen, xlen, lxlen, rxlen;
s64 nxaddr, xaddr; s64 nxaddr, xaddr;
struct tlock *tlck; struct tlock *tlck;
struct xtlock *xtlck = 0; struct xtlock *xtlck = NULL;
int rootsplit = 0, newpage = 0; int rootsplit = 0, newpage = 0;
/* there must exist extent to be tailgated */ /* there must exist extent to be tailgated */
...@@ -3416,9 +3416,9 @@ s64 xtTruncate(tid_t tid, struct inode *ip, s64 newsize, int flag) ...@@ -3416,9 +3416,9 @@ s64 xtTruncate(tid_t tid, struct inode *ip, s64 newsize, int flag)
int xlen, len, freexlen; int xlen, len, freexlen;
struct btstack btstack; struct btstack btstack;
struct btframe *parent; struct btframe *parent;
struct tblock *tblk = 0; struct tblock *tblk = NULL;
struct tlock *tlck = 0; struct tlock *tlck = NULL;
struct xtlock *xtlck = 0; struct xtlock *xtlck = NULL;
struct xdlistlock xadlock; /* maplock for COMMIT_WMAP */ struct xdlistlock xadlock; /* maplock for COMMIT_WMAP */
struct pxd_lock *pxdlock; /* maplock for COMMIT_WMAP */ struct pxd_lock *pxdlock; /* maplock for COMMIT_WMAP */
s64 nfreed; s64 nfreed;
...@@ -3614,7 +3614,7 @@ s64 xtTruncate(tid_t tid, struct inode *ip, s64 newsize, int flag) ...@@ -3614,7 +3614,7 @@ s64 xtTruncate(tid_t tid, struct inode *ip, s64 newsize, int flag)
pxdlock->flag = mlckFREEPXD; pxdlock->flag = mlckFREEPXD;
PXDaddress(&pxdlock->pxd, xaddr); PXDaddress(&pxdlock->pxd, xaddr);
PXDlength(&pxdlock->pxd, freexlen); PXDlength(&pxdlock->pxd, freexlen);
txFreeMap(ip, pxdlock, 0, COMMIT_WMAP); txFreeMap(ip, pxdlock, NULL, COMMIT_WMAP);
/* reset map lock */ /* reset map lock */
xadlock.flag = mlckFREEXADLIST; xadlock.flag = mlckFREEXADLIST;
...@@ -3642,8 +3642,8 @@ s64 xtTruncate(tid_t tid, struct inode *ip, s64 newsize, int flag) ...@@ -3642,8 +3642,8 @@ s64 xtTruncate(tid_t tid, struct inode *ip, s64 newsize, int flag)
xadlock.count = xadlock.count =
le16_to_cpu(p->header.nextindex) - le16_to_cpu(p->header.nextindex) -
nextindex; nextindex;
txFreeMap(ip, (struct maplock *) & xadlock, 0, txFreeMap(ip, (struct maplock *) & xadlock,
COMMIT_WMAP); NULL, COMMIT_WMAP);
} }
p->header.nextindex = cpu_to_le16(nextindex); p->header.nextindex = cpu_to_le16(nextindex);
} }
...@@ -3672,7 +3672,7 @@ s64 xtTruncate(tid_t tid, struct inode *ip, s64 newsize, int flag) ...@@ -3672,7 +3672,7 @@ s64 xtTruncate(tid_t tid, struct inode *ip, s64 newsize, int flag)
xadlock.xdlist = &p->xad[XTENTRYSTART]; xadlock.xdlist = &p->xad[XTENTRYSTART];
xadlock.count = xadlock.count =
le16_to_cpu(p->header.nextindex) - XTENTRYSTART; le16_to_cpu(p->header.nextindex) - XTENTRYSTART;
txFreeMap(ip, (struct maplock *) & xadlock, 0, COMMIT_WMAP); txFreeMap(ip, (struct maplock *) & xadlock, NULL, COMMIT_WMAP);
} }
if (p->header.flag & BT_ROOT) { if (p->header.flag & BT_ROOT) {
...@@ -3747,8 +3747,8 @@ s64 xtTruncate(tid_t tid, struct inode *ip, s64 newsize, int flag) ...@@ -3747,8 +3747,8 @@ s64 xtTruncate(tid_t tid, struct inode *ip, s64 newsize, int flag)
xadlock.count = xadlock.count =
le16_to_cpu(p->header.nextindex) - le16_to_cpu(p->header.nextindex) -
index - 1; index - 1;
txFreeMap(ip, (struct maplock *) & xadlock, 0, txFreeMap(ip, (struct maplock *) & xadlock,
COMMIT_WMAP); NULL, COMMIT_WMAP);
} }
BT_MARK_DIRTY(mp, ip); BT_MARK_DIRTY(mp, ip);
...@@ -3819,7 +3819,7 @@ s64 xtTruncate(tid_t tid, struct inode *ip, s64 newsize, int flag) ...@@ -3819,7 +3819,7 @@ s64 xtTruncate(tid_t tid, struct inode *ip, s64 newsize, int flag)
xadlock.count = xadlock.count =
le16_to_cpu(p->header.nextindex) - le16_to_cpu(p->header.nextindex) -
XTENTRYSTART; XTENTRYSTART;
txFreeMap(ip, (struct maplock *) & xadlock, 0, txFreeMap(ip, (struct maplock *) & xadlock, NULL,
COMMIT_WMAP); COMMIT_WMAP);
} }
BT_MARK_DIRTY(mp, ip); BT_MARK_DIRTY(mp, ip);
...@@ -3956,11 +3956,11 @@ s64 xtTruncate_pmap(tid_t tid, struct inode *ip, s64 committed_size) ...@@ -3956,11 +3956,11 @@ s64 xtTruncate_pmap(tid_t tid, struct inode *ip, s64 committed_size)
struct btframe *parent; struct btframe *parent;
int rc; int rc;
struct tblock *tblk; struct tblock *tblk;
struct tlock *tlck = 0; struct tlock *tlck = NULL;
xad_t *xad; xad_t *xad;
int xlen; int xlen;
s64 xoff; s64 xoff;
struct xtlock *xtlck = 0; struct xtlock *xtlck = NULL;
/* save object truncation type */ /* save object truncation type */
tblk = tid_to_tblock(tid); tblk = tid_to_tblock(tid);
......
...@@ -702,7 +702,7 @@ int freeZeroLink(struct inode *ip) ...@@ -702,7 +702,7 @@ int freeZeroLink(struct inode *ip)
pxdlock->flag = mlckFREEPXD; pxdlock->flag = mlckFREEPXD;
PXDaddress(&pxdlock->pxd, xaddr); PXDaddress(&pxdlock->pxd, xaddr);
PXDlength(&pxdlock->pxd, xlen); PXDlength(&pxdlock->pxd, xlen);
txFreeMap(ip, pxdlock, 0, COMMIT_WMAP); txFreeMap(ip, pxdlock, NULL, COMMIT_WMAP);
} }
/* /*
...@@ -722,7 +722,7 @@ int freeZeroLink(struct inode *ip) ...@@ -722,7 +722,7 @@ int freeZeroLink(struct inode *ip)
pxdlock->flag = mlckFREEPXD; pxdlock->flag = mlckFREEPXD;
PXDaddress(&pxdlock->pxd, xaddr); PXDaddress(&pxdlock->pxd, xaddr);
PXDlength(&pxdlock->pxd, xlen); PXDlength(&pxdlock->pxd, xlen);
txFreeMap(ip, pxdlock, 0, COMMIT_WMAP); txFreeMap(ip, pxdlock, NULL, COMMIT_WMAP);
} }
/* /*
......
...@@ -422,7 +422,7 @@ static int jfs_fill_super(struct super_block *sb, void *data, int silent) ...@@ -422,7 +422,7 @@ static int jfs_fill_super(struct super_block *sb, void *data, int silent)
goto out_kfree; goto out_kfree;
} }
if (sb->s_flags & MS_RDONLY) if (sb->s_flags & MS_RDONLY)
sbi->log = 0; sbi->log = NULL;
else { else {
rc = jfs_mount_rw(sb, 0); rc = jfs_mount_rw(sb, 0);
if (rc) { if (rc) {
...@@ -600,7 +600,7 @@ static int __init init_jfs_fs(void) ...@@ -600,7 +600,7 @@ static int __init init_jfs_fs(void)
/* /*
* I/O completion thread (endio) * I/O completion thread (endio)
*/ */
jfsIOthread = kernel_thread(jfsIOWait, 0, CLONE_KERNEL); jfsIOthread = kernel_thread(jfsIOWait, NULL, CLONE_KERNEL);
if (jfsIOthread < 0) { if (jfsIOthread < 0) {
jfs_err("init_jfs_fs: fork failed w/rc = %d", jfsIOthread); jfs_err("init_jfs_fs: fork failed w/rc = %d", jfsIOthread);
goto end_txmngr; goto end_txmngr;
...@@ -613,7 +613,7 @@ static int __init init_jfs_fs(void) ...@@ -613,7 +613,7 @@ static int __init init_jfs_fs(void)
commit_threads = MAX_COMMIT_THREADS; commit_threads = MAX_COMMIT_THREADS;
for (i = 0; i < commit_threads; i++) { for (i = 0; i < commit_threads; i++) {
jfsCommitThread[i] = kernel_thread(jfs_lazycommit, 0, jfsCommitThread[i] = kernel_thread(jfs_lazycommit, NULL,
CLONE_KERNEL); CLONE_KERNEL);
if (jfsCommitThread[i] < 0) { if (jfsCommitThread[i] < 0) {
jfs_err("init_jfs_fs: fork failed w/rc = %d", jfs_err("init_jfs_fs: fork failed w/rc = %d",
...@@ -625,7 +625,7 @@ static int __init init_jfs_fs(void) ...@@ -625,7 +625,7 @@ static int __init init_jfs_fs(void)
wait_for_completion(&jfsIOwait); wait_for_completion(&jfsIOwait);
} }
jfsSyncThread = kernel_thread(jfs_sync, 0, CLONE_KERNEL); jfsSyncThread = kernel_thread(jfs_sync, NULL, CLONE_KERNEL);
if (jfsSyncThread < 0) { if (jfsSyncThread < 0) {
jfs_err("init_jfs_fs: fork failed w/rc = %d", jfsSyncThread); jfs_err("init_jfs_fs: fork failed w/rc = %d", jfsSyncThread);
goto kill_committask; goto kill_committask;
......
...@@ -592,7 +592,7 @@ static int ea_put(struct inode *inode, struct ea_buffer *ea_buf, int new_size) ...@@ -592,7 +592,7 @@ static int ea_put(struct inode *inode, struct ea_buffer *ea_buf, int new_size)
if (new_size == 0) { if (new_size == 0) {
ea_release(inode, ea_buf); ea_release(inode, ea_buf);
ea_buf = 0; ea_buf = NULL;
} else if (ea_buf->flag & EA_INLINE) { } else if (ea_buf->flag & EA_INLINE) {
assert(new_size <= sizeof (ji->i_inline_ea)); assert(new_size <= sizeof (ji->i_inline_ea));
ji->mode2 &= ~INLINEEA; ji->mode2 &= ~INLINEEA;
...@@ -633,7 +633,7 @@ static int ea_put(struct inode *inode, struct ea_buffer *ea_buf, int new_size) ...@@ -633,7 +633,7 @@ static int ea_put(struct inode *inode, struct ea_buffer *ea_buf, int new_size)
} }
ji->ea = ea_buf->new_ea; ji->ea = ea_buf->new_ea;
} else { } else {
txEA(tid, inode, &ji->ea, 0); txEA(tid, inode, &ji->ea, NULL);
if (ji->ea.flag & DXD_INLINE) if (ji->ea.flag & DXD_INLINE)
ji->mode2 |= INLINEEA; ji->mode2 |= INLINEEA;
ji->ea.flag = 0; ji->ea.flag = 0;
...@@ -1039,5 +1039,5 @@ ssize_t jfs_listxattr(struct dentry * dentry, char *data, size_t buf_size) ...@@ -1039,5 +1039,5 @@ ssize_t jfs_listxattr(struct dentry * dentry, char *data, size_t buf_size)
int jfs_removexattr(struct dentry *dentry, const char *name) int jfs_removexattr(struct dentry *dentry, const char *name)
{ {
return __jfs_setxattr(dentry->d_inode, name, 0, 0, XATTR_REPLACE); return __jfs_setxattr(dentry->d_inode, name, NULL, 0, XATTR_REPLACE);
} }
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