extfs: Remove unused variables.
Found by: scan-build Reviewed by: fsu Differential Revision: https://reviews.freebsd.org/D14017
This commit is contained in:
parent
ee0afaa9d7
commit
7d84ca677f
@ -535,12 +535,11 @@ static uint32_t
|
|||||||
ext2_ei_csum(struct inode *ip, struct ext2fs_dinode *ei)
|
ext2_ei_csum(struct inode *ip, struct ext2fs_dinode *ei)
|
||||||
{
|
{
|
||||||
struct m_ext2fs *fs;
|
struct m_ext2fs *fs;
|
||||||
uint16_t old_lo, old_hi;
|
uint16_t old_hi;
|
||||||
uint32_t inum, gen, crc;
|
uint32_t inum, gen, crc;
|
||||||
|
|
||||||
fs = ip->i_e2fs;
|
fs = ip->i_e2fs;
|
||||||
|
|
||||||
old_lo = ei->e2di_chksum_lo;
|
|
||||||
ei->e2di_chksum_lo = 0;
|
ei->e2di_chksum_lo = 0;
|
||||||
if ((EXT2_INODE_SIZE(ip->i_e2fs) > E2FS_REV0_INODE_SIZE &&
|
if ((EXT2_INODE_SIZE(ip->i_e2fs) > E2FS_REV0_INODE_SIZE &&
|
||||||
ei->e2di_extra_isize >= EXT2_INODE_CSUM_HI_EXTRA_END)) {
|
ei->e2di_extra_isize >= EXT2_INODE_CSUM_HI_EXTRA_END)) {
|
||||||
|
@ -125,10 +125,8 @@ ext4_ext_print_path(struct inode *ip, struct ext4_extent_path *path)
|
|||||||
void
|
void
|
||||||
ext4_ext_print_extent_tree_status(struct inode * ip)
|
ext4_ext_print_extent_tree_status(struct inode * ip)
|
||||||
{
|
{
|
||||||
struct m_ext2fs *fs;
|
|
||||||
struct ext4_extent_header *ehp;
|
struct ext4_extent_header *ehp;
|
||||||
|
|
||||||
fs = ip->i_e2fs;
|
|
||||||
ehp = (struct ext4_extent_header *)(char *)ip->i_db;
|
ehp = (struct ext4_extent_header *)(char *)ip->i_db;
|
||||||
|
|
||||||
printf("Extent status:ip=%d\n", ip->i_number);
|
printf("Extent status:ip=%d\n", ip->i_number);
|
||||||
@ -882,7 +880,6 @@ ext4_ext_grow_indepth(struct inode *ip, struct ext4_extent_path *path,
|
|||||||
struct m_ext2fs *fs;
|
struct m_ext2fs *fs;
|
||||||
struct ext4_extent_path *curpath;
|
struct ext4_extent_path *curpath;
|
||||||
struct ext4_extent_header *neh;
|
struct ext4_extent_header *neh;
|
||||||
struct ext4_extent_index *fidx;
|
|
||||||
struct buf *bp;
|
struct buf *bp;
|
||||||
e4fs_daddr_t newblk;
|
e4fs_daddr_t newblk;
|
||||||
int error = 0;
|
int error = 0;
|
||||||
@ -925,7 +922,6 @@ ext4_ext_grow_indepth(struct inode *ip, struct ext4_extent_path *path,
|
|||||||
ext4_index_store_pblock(curpath->ep_index, newblk);
|
ext4_index_store_pblock(curpath->ep_index, newblk);
|
||||||
|
|
||||||
neh = ext4_ext_inode_header(ip);
|
neh = ext4_ext_inode_header(ip);
|
||||||
fidx = EXT_FIRST_INDEX(neh);
|
|
||||||
neh->eh_depth = path->ep_depth + 1;
|
neh->eh_depth = path->ep_depth + 1;
|
||||||
ext4_ext_dirty(ip, curpath);
|
ext4_ext_dirty(ip, curpath);
|
||||||
out:
|
out:
|
||||||
@ -938,12 +934,9 @@ static int
|
|||||||
ext4_ext_create_new_leaf(struct inode *ip, struct ext4_extent_path *path,
|
ext4_ext_create_new_leaf(struct inode *ip, struct ext4_extent_path *path,
|
||||||
struct ext4_extent *newext)
|
struct ext4_extent *newext)
|
||||||
{
|
{
|
||||||
struct m_ext2fs *fs;
|
|
||||||
struct ext4_extent_path *curpath;
|
struct ext4_extent_path *curpath;
|
||||||
int depth, i, error;
|
int depth, i, error;
|
||||||
|
|
||||||
fs = ip->i_e2fs;
|
|
||||||
|
|
||||||
repeat:
|
repeat:
|
||||||
i = depth = ext4_ext_inode_depth(ip);
|
i = depth = ext4_ext_inode_depth(ip);
|
||||||
|
|
||||||
@ -1033,13 +1026,11 @@ static int
|
|||||||
ext4_ext_insert_extent(struct inode *ip, struct ext4_extent_path *path,
|
ext4_ext_insert_extent(struct inode *ip, struct ext4_extent_path *path,
|
||||||
struct ext4_extent *newext)
|
struct ext4_extent *newext)
|
||||||
{
|
{
|
||||||
struct m_ext2fs *fs;
|
|
||||||
struct ext4_extent_header * eh;
|
struct ext4_extent_header * eh;
|
||||||
struct ext4_extent *ex, *nex, *nearex;
|
struct ext4_extent *ex, *nex, *nearex;
|
||||||
struct ext4_extent_path *npath;
|
struct ext4_extent_path *npath;
|
||||||
int depth, len, error, next;
|
int depth, len, error, next;
|
||||||
|
|
||||||
fs = ip->i_e2fs;
|
|
||||||
depth = ext4_ext_inode_depth(ip);
|
depth = ext4_ext_inode_depth(ip);
|
||||||
ex = path[depth].ep_ext;
|
ex = path[depth].ep_ext;
|
||||||
npath = NULL;
|
npath = NULL;
|
||||||
@ -1166,11 +1157,9 @@ ext4_new_blocks(struct inode *ip, daddr_t lbn, e4fs_daddr_t pref,
|
|||||||
struct ucred *cred, unsigned long *count, int *perror)
|
struct ucred *cred, unsigned long *count, int *perror)
|
||||||
{
|
{
|
||||||
struct m_ext2fs *fs;
|
struct m_ext2fs *fs;
|
||||||
struct ext2mount *ump;
|
|
||||||
e4fs_daddr_t newblk;
|
e4fs_daddr_t newblk;
|
||||||
|
|
||||||
fs = ip->i_e2fs;
|
fs = ip->i_e2fs;
|
||||||
ump = ip->i_ump;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* We will allocate only single block for now.
|
* We will allocate only single block for now.
|
||||||
|
@ -869,8 +869,8 @@ ext2_direnter(struct inode *ip, struct vnode *dvp, struct componentname *cnp)
|
|||||||
struct inode *dp;
|
struct inode *dp;
|
||||||
struct ext2fs_direct_2 newdir;
|
struct ext2fs_direct_2 newdir;
|
||||||
struct buf *bp;
|
struct buf *bp;
|
||||||
int error, newentrysize;
|
|
||||||
int DIRBLKSIZ = ip->i_e2fs->e2fs_bsize;
|
int DIRBLKSIZ = ip->i_e2fs->e2fs_bsize;
|
||||||
|
int error;
|
||||||
|
|
||||||
|
|
||||||
#ifdef INVARIANTS
|
#ifdef INVARIANTS
|
||||||
@ -886,7 +886,6 @@ ext2_direnter(struct inode *ip, struct vnode *dvp, struct componentname *cnp)
|
|||||||
else
|
else
|
||||||
newdir.e2d_type = EXT2_FT_UNKNOWN;
|
newdir.e2d_type = EXT2_FT_UNKNOWN;
|
||||||
bcopy(cnp->cn_nameptr, newdir.e2d_name, (unsigned)cnp->cn_namelen + 1);
|
bcopy(cnp->cn_nameptr, newdir.e2d_name, (unsigned)cnp->cn_namelen + 1);
|
||||||
newentrysize = EXT2_DIR_REC_LEN(newdir.e2d_namlen);
|
|
||||||
|
|
||||||
if (ext2_htree_has_idx(dp)) {
|
if (ext2_htree_has_idx(dp)) {
|
||||||
error = ext2_htree_add_entry(dvp, &newdir, cnp);
|
error = ext2_htree_add_entry(dvp, &newdir, cnp);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user