Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 107405
b: refs/heads/master
c: f0e2d93
h: refs/heads/master
i:
  107403: b27f729
v: v3
  • Loading branch information
Denys Vlasenko authored and Niv Sardi committed Jul 28, 2008
1 parent f277c5d commit cf47f48
Show file tree
Hide file tree
Showing 32 changed files with 123 additions and 139 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 7c12f296500e1157872ef45b3f3bb06b4b73f1c1
refs/heads/master: f0e2d93c29dc39ffd24cac180a19d48f700c0706
4 changes: 2 additions & 2 deletions trunk/fs/xfs/linux-2.6/kmem.c
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ kmem_zalloc_greedy(size_t *size, size_t minsize, size_t maxsize,
}

void
kmem_free(void *ptr, size_t size)
kmem_free(void *ptr)
{
if (!is_vmalloc_addr(ptr)) {
kfree(ptr);
Expand All @@ -110,7 +110,7 @@ kmem_realloc(void *ptr, size_t newsize, size_t oldsize,
if (new)
memcpy(new, ptr,
((oldsize < newsize) ? oldsize : newsize));
kmem_free(ptr, oldsize);
kmem_free(ptr);
}
return new;
}
Expand Down
2 changes: 1 addition & 1 deletion trunk/fs/xfs/linux-2.6/kmem.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ extern void *kmem_alloc(size_t, unsigned int __nocast);
extern void *kmem_zalloc(size_t, unsigned int __nocast);
extern void *kmem_zalloc_greedy(size_t *, size_t, size_t, unsigned int __nocast);
extern void *kmem_realloc(void *, size_t, size_t, unsigned int __nocast);
extern void kmem_free(void *, size_t);
extern void kmem_free(void *);

/*
* Zone interfaces
Expand Down
9 changes: 4 additions & 5 deletions trunk/fs/xfs/linux-2.6/xfs_buf.c
Original file line number Diff line number Diff line change
Expand Up @@ -310,8 +310,7 @@ _xfs_buf_free_pages(
xfs_buf_t *bp)
{
if (bp->b_pages != bp->b_page_array) {
kmem_free(bp->b_pages,
bp->b_page_count * sizeof(struct page *));
kmem_free(bp->b_pages);
}
}

Expand Down Expand Up @@ -1398,7 +1397,7 @@ STATIC void
xfs_free_bufhash(
xfs_buftarg_t *btp)
{
kmem_free(btp->bt_hash, (1<<btp->bt_hashshift) * sizeof(xfs_bufhash_t));
kmem_free(btp->bt_hash);
btp->bt_hash = NULL;
}

Expand Down Expand Up @@ -1444,7 +1443,7 @@ xfs_free_buftarg(
xfs_unregister_buftarg(btp);
kthread_stop(btp->bt_task);

kmem_free(btp, sizeof(*btp));
kmem_free(btp);
}

STATIC int
Expand Down Expand Up @@ -1575,7 +1574,7 @@ xfs_alloc_buftarg(
return btp;

error:
kmem_free(btp, sizeof(*btp));
kmem_free(btp);
return NULL;
}

Expand Down
8 changes: 4 additions & 4 deletions trunk/fs/xfs/linux-2.6/xfs_super.c
Original file line number Diff line number Diff line change
Expand Up @@ -1074,7 +1074,7 @@ xfssyncd(
list_del(&work->w_list);
if (work == &mp->m_sync_work)
continue;
kmem_free(work, sizeof(struct bhv_vfs_sync_work));
kmem_free(work);
}
}

Expand Down Expand Up @@ -1222,7 +1222,7 @@ xfs_fs_remount(
error = xfs_parseargs(mp, options, args, 1);
if (!error)
error = xfs_mntupdate(mp, flags, args);
kmem_free(args, sizeof(*args));
kmem_free(args);
return -error;
}

Expand Down Expand Up @@ -1369,7 +1369,7 @@ xfs_fs_fill_super(

xfs_itrace_exit(XFS_I(sb->s_root->d_inode));

kmem_free(args, sizeof(*args));
kmem_free(args);
return 0;

fail_vnrele:
Expand All @@ -1384,7 +1384,7 @@ xfs_fs_fill_super(
xfs_unmount(mp, 0, NULL);

fail_vfsop:
kmem_free(args, sizeof(*args));
kmem_free(args);
return -error;
}

Expand Down
4 changes: 2 additions & 2 deletions trunk/fs/xfs/quota/xfs_dquot_item.c
Original file line number Diff line number Diff line change
Expand Up @@ -576,8 +576,8 @@ xfs_qm_qoffend_logitem_committed(
* xfs_trans_delete_ail() drops the AIL lock.
*/
xfs_trans_delete_ail(qfs->qql_item.li_mountp, (xfs_log_item_t *)qfs);
kmem_free(qfs, sizeof(xfs_qoff_logitem_t));
kmem_free(qfe, sizeof(xfs_qoff_logitem_t));
kmem_free(qfs);
kmem_free(qfe);
return (xfs_lsn_t)-1;
}

Expand Down
12 changes: 6 additions & 6 deletions trunk/fs/xfs/quota/xfs_qm.c
Original file line number Diff line number Diff line change
Expand Up @@ -192,16 +192,16 @@ xfs_qm_destroy(
xfs_qm_list_destroy(&(xqm->qm_usr_dqhtable[i]));
xfs_qm_list_destroy(&(xqm->qm_grp_dqhtable[i]));
}
kmem_free(xqm->qm_usr_dqhtable, hsize * sizeof(xfs_dqhash_t));
kmem_free(xqm->qm_grp_dqhtable, hsize * sizeof(xfs_dqhash_t));
kmem_free(xqm->qm_usr_dqhtable);
kmem_free(xqm->qm_grp_dqhtable);
xqm->qm_usr_dqhtable = NULL;
xqm->qm_grp_dqhtable = NULL;
xqm->qm_dqhashmask = 0;
xfs_qm_freelist_destroy(&(xqm->qm_dqfreelist));
#ifdef DEBUG
mutex_destroy(&qcheck_lock);
#endif
kmem_free(xqm, sizeof(xfs_qm_t));
kmem_free(xqm);
}

/*
Expand Down Expand Up @@ -1134,7 +1134,7 @@ xfs_qm_init_quotainfo(
* and change the superblock accordingly.
*/
if ((error = xfs_qm_init_quotainos(mp))) {
kmem_free(qinf, sizeof(xfs_quotainfo_t));
kmem_free(qinf);
mp->m_quotainfo = NULL;
return error;
}
Expand Down Expand Up @@ -1248,7 +1248,7 @@ xfs_qm_destroy_quotainfo(
qi->qi_gquotaip = NULL;
}
mutex_destroy(&qi->qi_quotaofflock);
kmem_free(qi, sizeof(xfs_quotainfo_t));
kmem_free(qi);
mp->m_quotainfo = NULL;
}

Expand Down Expand Up @@ -1623,7 +1623,7 @@ xfs_qm_dqiterate(
break;
} while (nmaps > 0);

kmem_free(map, XFS_DQITER_MAP_SIZE * sizeof(*map));
kmem_free(map);

return error;
}
Expand Down
8 changes: 4 additions & 4 deletions trunk/fs/xfs/quota/xfs_qm_syscalls.c
Original file line number Diff line number Diff line change
Expand Up @@ -1449,14 +1449,14 @@ xfs_qm_internalqcheck(
for (d = (xfs_dqtest_t *) h1->qh_next; d != NULL; ) {
xfs_dqtest_cmp(d);
e = (xfs_dqtest_t *) d->HL_NEXT;
kmem_free(d, sizeof(xfs_dqtest_t));
kmem_free(d);
d = e;
}
h1 = &qmtest_gdqtab[i];
for (d = (xfs_dqtest_t *) h1->qh_next; d != NULL; ) {
xfs_dqtest_cmp(d);
e = (xfs_dqtest_t *) d->HL_NEXT;
kmem_free(d, sizeof(xfs_dqtest_t));
kmem_free(d);
d = e;
}
}
Expand All @@ -1467,8 +1467,8 @@ xfs_qm_internalqcheck(
} else {
cmn_err(CE_DEBUG, "******** quotacheck successful! ********");
}
kmem_free(qmtest_udqtab, qmtest_hashmask * sizeof(xfs_dqhash_t));
kmem_free(qmtest_gdqtab, qmtest_hashmask * sizeof(xfs_dqhash_t));
kmem_free(qmtest_udqtab);
kmem_free(qmtest_gdqtab);
mutex_unlock(&qcheck_lock);
return (qmtest_nfails);
}
Expand Down
4 changes: 2 additions & 2 deletions trunk/fs/xfs/support/ktrace.c
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ ktrace_alloc(int nentries, unsigned int __nocast sleep)
if (sleep & KM_SLEEP)
panic("ktrace_alloc: NULL memory on KM_SLEEP request!");

kmem_free(ktp, sizeof(*ktp));
kmem_free(ktp);

return NULL;
}
Expand Down Expand Up @@ -126,7 +126,7 @@ ktrace_free(ktrace_t *ktp)
} else {
entries_size = (int)(ktp->kt_nentries * sizeof(ktrace_entry_t));

kmem_free(ktp->kt_entries, entries_size);
kmem_free(ktp->kt_entries);
}

kmem_zone_free(ktrace_hdr_zone, ktp);
Expand Down
18 changes: 9 additions & 9 deletions trunk/fs/xfs/xfs_attr_leaf.c
Original file line number Diff line number Diff line change
Expand Up @@ -555,7 +555,7 @@ xfs_attr_shortform_to_leaf(xfs_da_args_t *args)
out:
if(bp)
xfs_da_buf_done(bp);
kmem_free(tmpbuffer, size);
kmem_free(tmpbuffer);
return(error);
}

Expand Down Expand Up @@ -676,7 +676,7 @@ xfs_attr_shortform_list(xfs_attr_list_context_t *context)
XFS_ERRLEVEL_LOW,
context->dp->i_mount, sfe);
xfs_attr_trace_l_c("sf corrupted", context);
kmem_free(sbuf, sbsize);
kmem_free(sbuf);
return XFS_ERROR(EFSCORRUPTED);
}
if (!xfs_attr_namesp_match_overrides(context->flags, sfe->flags)) {
Expand Down Expand Up @@ -717,7 +717,7 @@ xfs_attr_shortform_list(xfs_attr_list_context_t *context)
}
}
if (i == nsbuf) {
kmem_free(sbuf, sbsize);
kmem_free(sbuf);
xfs_attr_trace_l_c("blk end", context);
return(0);
}
Expand Down Expand Up @@ -747,7 +747,7 @@ xfs_attr_shortform_list(xfs_attr_list_context_t *context)
cursor->offset++;
}

kmem_free(sbuf, sbsize);
kmem_free(sbuf);
xfs_attr_trace_l_c("sf E-O-F", context);
return(0);
}
Expand Down Expand Up @@ -873,7 +873,7 @@ xfs_attr_leaf_to_shortform(xfs_dabuf_t *bp, xfs_da_args_t *args, int forkoff)
error = 0;

out:
kmem_free(tmpbuffer, XFS_LBSIZE(dp->i_mount));
kmem_free(tmpbuffer);
return(error);
}

Expand Down Expand Up @@ -1271,7 +1271,7 @@ xfs_attr_leaf_compact(xfs_trans_t *trans, xfs_dabuf_t *bp)
be16_to_cpu(hdr_s->count), mp);
xfs_da_log_buf(trans, bp, 0, XFS_LBSIZE(mp) - 1);

kmem_free(tmpbuffer, XFS_LBSIZE(mp));
kmem_free(tmpbuffer);
}

/*
Expand Down Expand Up @@ -1921,7 +1921,7 @@ xfs_attr_leaf_unbalance(xfs_da_state_t *state, xfs_da_state_blk_t *drop_blk,
be16_to_cpu(drop_hdr->count), mp);
}
memcpy((char *)save_leaf, (char *)tmp_leaf, state->blocksize);
kmem_free(tmpbuffer, state->blocksize);
kmem_free(tmpbuffer);
}

xfs_da_log_buf(state->args->trans, save_blk->bp, 0,
Expand Down Expand Up @@ -2451,7 +2451,7 @@ xfs_attr_leaf_list_int(xfs_dabuf_t *bp, xfs_attr_list_context_t *context)
(int)name_rmt->namelen,
valuelen,
(char*)args.value);
kmem_free(args.value, valuelen);
kmem_free(args.value);
}
else {
retval = context->put_listent(context,
Expand Down Expand Up @@ -2954,7 +2954,7 @@ xfs_attr_leaf_inactive(xfs_trans_t **trans, xfs_inode_t *dp, xfs_dabuf_t *bp)
error = tmp; /* save only the 1st errno */
}

kmem_free((xfs_caddr_t)list, size);
kmem_free((xfs_caddr_t)list);
return(error);
}

Expand Down
2 changes: 1 addition & 1 deletion trunk/fs/xfs/xfs_bmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -5970,7 +5970,7 @@ xfs_getbmap(
xfs_iunlock_map_shared(ip, lock);
xfs_iunlock(ip, XFS_IOLOCK_SHARED);

kmem_free(map, subnex * sizeof(*map));
kmem_free(map);

return error;
}
Expand Down
8 changes: 4 additions & 4 deletions trunk/fs/xfs/xfs_buf_item.c
Original file line number Diff line number Diff line change
Expand Up @@ -889,9 +889,9 @@ xfs_buf_item_relse(
}

#ifdef XFS_TRANS_DEBUG
kmem_free(bip->bli_orig, XFS_BUF_COUNT(bp));
kmem_free(bip->bli_orig);
bip->bli_orig = NULL;
kmem_free(bip->bli_logged, XFS_BUF_COUNT(bp) / NBBY);
kmem_free(bip->bli_logged);
bip->bli_logged = NULL;
#endif /* XFS_TRANS_DEBUG */

Expand Down Expand Up @@ -1138,9 +1138,9 @@ xfs_buf_iodone(
xfs_trans_delete_ail(mp, (xfs_log_item_t *)bip);

#ifdef XFS_TRANS_DEBUG
kmem_free(bip->bli_orig, XFS_BUF_COUNT(bp));
kmem_free(bip->bli_orig);
bip->bli_orig = NULL;
kmem_free(bip->bli_logged, XFS_BUF_COUNT(bp) / NBBY);
kmem_free(bip->bli_logged);
bip->bli_logged = NULL;
#endif /* XFS_TRANS_DEBUG */

Expand Down
Loading

0 comments on commit cf47f48

Please sign in to comment.