Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 014c2544 authored by Jesper Juhl's avatar Jesper Juhl Committed by Adrian Bunk
Browse files

return statement cleanup - kill pointless parentheses



This patch removes pointless parentheses from return statements.

Signed-off-by: default avatarJesper Juhl <juhl-lkml@dif.dk>
Signed-off-by: default avatarAdrian Bunk <bunk@stusta.de>
parent 46a9f65f
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -36,7 +36,7 @@ unsigned int csum_partial_copy_nocheck(const unsigned char *src, unsigned char *
				       int len, int sum)
{
	memcpy(dst, src, len);
	return(csum_partial(dst, len, sum));
	return csum_partial(dst, len, sum);
}

/*
@@ -104,7 +104,7 @@ static inline unsigned short ip_fast_csum(unsigned char * iph,
	: "=r" (sum), "=r" (iph), "=r" (ihl)
	: "1" (iph), "2" (ihl)
	: "memory");
	return(sum);
	return sum;
}

/*
+64 −64
Original line number Diff line number Diff line
@@ -738,7 +738,7 @@ static int __init stallion_module_init(void)
	stl_init();
	restore_flags(flags);

	return(0);
	return 0;
}

/*****************************************************************************/
@@ -889,7 +889,7 @@ static unsigned long stl_atol(char *str)
		}
		val = (val * base) + c;
	}
	return(val);
	return val;
}

/*****************************************************************************/
@@ -908,7 +908,7 @@ static int stl_parsebrd(stlconf_t *confp, char **argp)
#endif

	if ((argp[0] == (char *) NULL) || (*argp[0] == 0))
		return(0);
		return 0;

	for (sp = argp[0], i = 0; ((*sp != 0) && (i < 25)); sp++, i++)
		*sp = TOLOWER(*sp);
@@ -935,7 +935,7 @@ static int stl_parsebrd(stlconf_t *confp, char **argp)
	}
	if ((argp[i] != (char *) NULL) && (*argp[i] != 0))
		confp->irq = stl_atol(argp[i]);
	return(1);
	return 1;
}

/*****************************************************************************/
@@ -946,7 +946,7 @@ static int stl_parsebrd(stlconf_t *confp, char **argp)

static void *stl_memalloc(int len)
{
	return((void *) kmalloc(len, GFP_KERNEL));
	return (void *) kmalloc(len, GFP_KERNEL);
}

/*****************************************************************************/
@@ -963,12 +963,12 @@ static stlbrd_t *stl_allocbrd(void)
	if (brdp == (stlbrd_t *) NULL) {
		printk("STALLION: failed to allocate memory (size=%d)\n",
			sizeof(stlbrd_t));
		return((stlbrd_t *) NULL);
		return (stlbrd_t *) NULL;
	}

	memset(brdp, 0, sizeof(stlbrd_t));
	brdp->magic = STL_BOARDMAGIC;
	return(brdp);
	return brdp;
}

/*****************************************************************************/
@@ -988,10 +988,10 @@ static int stl_open(struct tty_struct *tty, struct file *filp)
	minordev = tty->index;
	brdnr = MINOR2BRD(minordev);
	if (brdnr >= stl_nrbrds)
		return(-ENODEV);
		return -ENODEV;
	brdp = stl_brds[brdnr];
	if (brdp == (stlbrd_t *) NULL)
		return(-ENODEV);
		return -ENODEV;
	minordev = MINOR2PORT(minordev);
	for (portnr = -1, panelnr = 0; (panelnr < STL_MAXPANELS); panelnr++) {
		if (brdp->panels[panelnr] == (stlpanel_t *) NULL)
@@ -1003,11 +1003,11 @@ static int stl_open(struct tty_struct *tty, struct file *filp)
		minordev -= brdp->panels[panelnr]->nrports;
	}
	if (portnr < 0)
		return(-ENODEV);
		return -ENODEV;

	portp = brdp->panels[panelnr]->ports[portnr];
	if (portp == (stlport_t *) NULL)
		return(-ENODEV);
		return -ENODEV;

/*
 *	On the first open of the device setup the port hardware, and
@@ -1021,7 +1021,7 @@ static int stl_open(struct tty_struct *tty, struct file *filp)
		if (portp->tx.buf == (char *) NULL) {
			portp->tx.buf = (char *) stl_memalloc(STL_TXBUFSIZE);
			if (portp->tx.buf == (char *) NULL)
				return(-ENOMEM);
				return -ENOMEM;
			portp->tx.head = portp->tx.buf;
			portp->tx.tail = portp->tx.buf;
		}
@@ -1043,8 +1043,8 @@ static int stl_open(struct tty_struct *tty, struct file *filp)
	if (portp->flags & ASYNC_CLOSING) {
		interruptible_sleep_on(&portp->close_wait);
		if (portp->flags & ASYNC_HUP_NOTIFY)
			return(-EAGAIN);
		return(-ERESTARTSYS);
			return -EAGAIN;
		return -ERESTARTSYS;
	}

/*
@@ -1054,11 +1054,11 @@ static int stl_open(struct tty_struct *tty, struct file *filp)
 */
	if (!(filp->f_flags & O_NONBLOCK)) {
		if ((rc = stl_waitcarrier(portp, filp)) != 0)
			return(rc);
			return rc;
	}
	portp->flags |= ASYNC_NORMAL_ACTIVE;

	return(0);
	return 0;
}

/*****************************************************************************/
@@ -1115,7 +1115,7 @@ static int stl_waitcarrier(stlport_t *portp, struct file *filp)
	portp->openwaitcnt--;
	restore_flags(flags);

	return(rc);
	return rc;
}

/*****************************************************************************/
@@ -1211,12 +1211,12 @@ static int stl_write(struct tty_struct *tty, const unsigned char *buf, int count

	if ((tty == (struct tty_struct *) NULL) ||
	    (stl_tmpwritebuf == (char *) NULL))
		return(0);
		return 0;
	portp = tty->driver_data;
	if (portp == (stlport_t *) NULL)
		return(0);
		return 0;
	if (portp->tx.buf == (char *) NULL)
		return(0);
		return 0;

/*
 *	If copying direct from user space we must cater for page faults,
@@ -1255,7 +1255,7 @@ static int stl_write(struct tty_struct *tty, const unsigned char *buf, int count
	clear_bit(ASYI_TXLOW, &portp->istate);
	stl_startrxtx(portp, -1, 1);

	return(count);
	return count;
}

/*****************************************************************************/
@@ -1336,12 +1336,12 @@ static int stl_writeroom(struct tty_struct *tty)
#endif

	if (tty == (struct tty_struct *) NULL)
		return(0);
		return 0;
	portp = tty->driver_data;
	if (portp == (stlport_t *) NULL)
		return(0);
		return 0;
	if (portp->tx.buf == (char *) NULL)
		return(0);
		return 0;

	head = portp->tx.head;
	tail = portp->tx.tail;
@@ -1370,19 +1370,19 @@ static int stl_charsinbuffer(struct tty_struct *tty)
#endif

	if (tty == (struct tty_struct *) NULL)
		return(0);
		return 0;
	portp = tty->driver_data;
	if (portp == (stlport_t *) NULL)
		return(0);
		return 0;
	if (portp->tx.buf == (char *) NULL)
		return(0);
		return 0;

	head = portp->tx.head;
	tail = portp->tx.tail;
	size = (head >= tail) ? (head - tail) : (STL_TXBUFSIZE - (tail - head));
	if ((size == 0) && test_bit(ASYI_TXBUSY, &portp->istate))
		size = 1;
	return(size);
	return size;
}

/*****************************************************************************/
@@ -1447,7 +1447,7 @@ static int stl_setserial(stlport_t *portp, struct serial_struct __user *sp)
		    (sio.close_delay != portp->close_delay) ||
		    ((sio.flags & ~ASYNC_USR_MASK) !=
		    (portp->flags & ~ASYNC_USR_MASK)))
			return(-EPERM);
			return -EPERM;
	} 

	portp->flags = (portp->flags & ~ASYNC_USR_MASK) |
@@ -1457,7 +1457,7 @@ static int stl_setserial(stlport_t *portp, struct serial_struct __user *sp)
	portp->closing_wait = sio.closing_wait;
	portp->custom_divisor = sio.custom_divisor;
	stl_setport(portp, portp->tty->termios);
	return(0);
	return 0;
}

/*****************************************************************************/
@@ -1467,12 +1467,12 @@ static int stl_tiocmget(struct tty_struct *tty, struct file *file)
	stlport_t	*portp;

	if (tty == (struct tty_struct *) NULL)
		return(-ENODEV);
		return -ENODEV;
	portp = tty->driver_data;
	if (portp == (stlport_t *) NULL)
		return(-ENODEV);
		return -ENODEV;
	if (tty->flags & (1 << TTY_IO_ERROR))
		return(-EIO);
		return -EIO;

	return stl_getsignals(portp);
}
@@ -1484,12 +1484,12 @@ static int stl_tiocmset(struct tty_struct *tty, struct file *file,
	int rts = -1, dtr = -1;

	if (tty == (struct tty_struct *) NULL)
		return(-ENODEV);
		return -ENODEV;
	portp = tty->driver_data;
	if (portp == (stlport_t *) NULL)
		return(-ENODEV);
		return -ENODEV;
	if (tty->flags & (1 << TTY_IO_ERROR))
		return(-EIO);
		return -EIO;

	if (set & TIOCM_RTS)
		rts = 1;
@@ -1517,15 +1517,15 @@ static int stl_ioctl(struct tty_struct *tty, struct file *file, unsigned int cmd
#endif

	if (tty == (struct tty_struct *) NULL)
		return(-ENODEV);
		return -ENODEV;
	portp = tty->driver_data;
	if (portp == (stlport_t *) NULL)
		return(-ENODEV);
		return -ENODEV;

	if ((cmd != TIOCGSERIAL) && (cmd != TIOCSSERIAL) &&
 	    (cmd != COM_GETPORTSTATS) && (cmd != COM_CLRPORTSTATS)) {
		if (tty->flags & (1 << TTY_IO_ERROR))
			return(-EIO);
			return -EIO;
	}

	rc = 0;
@@ -1566,7 +1566,7 @@ static int stl_ioctl(struct tty_struct *tty, struct file *file, unsigned int cmd
		break;
	}

	return(rc);
	return rc;
}

/*****************************************************************************/
@@ -1872,7 +1872,7 @@ static int stl_portinfo(stlport_t *portp, int portnr, char *pos)
		pos[(MAXLINE - 2)] = '+';
	pos[(MAXLINE - 1)] = '\n';

	return(MAXLINE);
	return MAXLINE;
}

/*****************************************************************************/
@@ -2349,7 +2349,7 @@ static inline int stl_initeio(stlbrd_t *brdp)
	} else {
		rc = 0;
	}
	return(rc);
	return rc;
}

/*****************************************************************************/
@@ -3116,7 +3116,7 @@ static int __init stl_init(void)
		return -1;
	}

	return(0);
	return 0;
}

/*****************************************************************************/
@@ -3132,7 +3132,7 @@ static int __init stl_init(void)
static int stl_cd1400getreg(stlport_t *portp, int regnr)
{
	outb((regnr + portp->uartaddr), portp->ioaddr);
	return(inb(portp->ioaddr + EREG_DATA));
	return inb(portp->ioaddr + EREG_DATA);
}

static void stl_cd1400setreg(stlport_t *portp, int regnr, int value)
@@ -3146,9 +3146,9 @@ static int stl_cd1400updatereg(stlport_t *portp, int regnr, int value)
	outb((regnr + portp->uartaddr), portp->ioaddr);
	if (inb(portp->ioaddr + EREG_DATA) != value) {
		outb(value, portp->ioaddr + EREG_DATA);
		return(1);
		return 1;
	}
	return(0);
	return 0;
}

/*****************************************************************************/
@@ -3206,7 +3206,7 @@ static int stl_cd1400panelinit(stlbrd_t *brdp, stlpanel_t *panelp)
	}

	BRDDISABLE(panelp->brdnr);
	return(chipmask);
	return chipmask;
}

/*****************************************************************************/
@@ -3557,7 +3557,7 @@ static int stl_cd1400getsignals(stlport_t *portp)
#else
	sigs |= TIOCM_DSR;
#endif
	return(sigs);
	return sigs;
}

/*****************************************************************************/
@@ -3830,9 +3830,9 @@ static int stl_cd1400datastate(stlport_t *portp)
#endif

	if (portp == (stlport_t *) NULL)
		return(0);
		return 0;

	return(test_bit(ASYI_TXBUSY, &portp->istate) ? 1 : 0);
	return test_bit(ASYI_TXBUSY, &portp->istate) ? 1 : 0;
}

/*****************************************************************************/
@@ -3912,20 +3912,20 @@ static inline int stl_cd1400breakisr(stlport_t *portp, int ioaddr)
		outb((SRER + portp->uartaddr), ioaddr);
		outb((inb(ioaddr + EREG_DATA) & ~(SRER_TXDATA | SRER_TXEMPTY)),
			(ioaddr + EREG_DATA));
		return(1);
		return 1;
	} else if (portp->brklen > 1) {
		outb((TDR + portp->uartaddr), ioaddr);
		outb(ETC_CMD, (ioaddr + EREG_DATA));
		outb(ETC_STOPBREAK, (ioaddr + EREG_DATA));
		portp->brklen = -1;
		return(1);
		return 1;
	} else {
		outb((COR2 + portp->uartaddr), ioaddr);
		outb((inb(ioaddr + EREG_DATA) & ~COR2_ETC),
			(ioaddr + EREG_DATA));
		portp->brklen = 0;
	}
	return(0);
	return 0;
}

/*****************************************************************************/
@@ -4166,7 +4166,7 @@ static void stl_cd1400mdmisr(stlpanel_t *panelp, int ioaddr)
static int stl_sc26198getreg(stlport_t *portp, int regnr)
{
	outb((regnr | portp->uartaddr), (portp->ioaddr + XP_ADDR));
	return(inb(portp->ioaddr + XP_DATA));
	return inb(portp->ioaddr + XP_DATA);
}

static void stl_sc26198setreg(stlport_t *portp, int regnr, int value)
@@ -4180,9 +4180,9 @@ static int stl_sc26198updatereg(stlport_t *portp, int regnr, int value)
	outb((regnr | portp->uartaddr), (portp->ioaddr + XP_ADDR));
	if (inb(portp->ioaddr + XP_DATA) != value) {
		outb(value, (portp->ioaddr + XP_DATA));
		return(1);
		return 1;
	}
	return(0);
	return 0;
}

/*****************************************************************************/
@@ -4194,7 +4194,7 @@ static int stl_sc26198updatereg(stlport_t *portp, int regnr, int value)
static int stl_sc26198getglobreg(stlport_t *portp, int regnr)
{
	outb(regnr, (portp->ioaddr + XP_ADDR));
	return(inb(portp->ioaddr + XP_DATA));
	return inb(portp->ioaddr + XP_DATA);
}

#if 0
@@ -4252,7 +4252,7 @@ static int stl_sc26198panelinit(stlbrd_t *brdp, stlpanel_t *panelp)
	}

	BRDDISABLE(panelp->brdnr);
	return(chipmask);
	return chipmask;
}

/*****************************************************************************/
@@ -4546,7 +4546,7 @@ static int stl_sc26198getsignals(stlport_t *portp)
	sigs |= (ipr & IPR_DTR) ? 0: TIOCM_DTR;
	sigs |= (ipr & IPR_RTS) ? 0: TIOCM_RTS;
	sigs |= TIOCM_DSR;
	return(sigs);
	return sigs;
}

/*****************************************************************************/
@@ -4828,9 +4828,9 @@ static int stl_sc26198datastate(stlport_t *portp)
#endif

	if (portp == (stlport_t *) NULL)
		return(0);
		return 0;
	if (test_bit(ASYI_TXBUSY, &portp->istate))
		return(1);
		return 1;

	save_flags(flags);
	cli();
@@ -4839,7 +4839,7 @@ static int stl_sc26198datastate(stlport_t *portp)
	BRDDISABLE(portp->brdnr);
	restore_flags(flags);

	return((sr & SR_TXEMPTY) ? 0 : 1);
	return (sr & SR_TXEMPTY) ? 0 : 1;
}

/*****************************************************************************/
+3 −2
Original line number Diff line number Diff line
@@ -222,12 +222,13 @@ static efs_block_t efs_validate_vh(struct volume_header *vh) {
			sblock);
#endif
	}
	return(sblock);
	return sblock;
}

static int efs_validate_super(struct efs_sb_info *sb, struct efs_super *super) {

	if (!IS_EFS_MAGIC(be32_to_cpu(super->fs_magic))) return -1;
	if (!IS_EFS_MAGIC(be32_to_cpu(super->fs_magic)))
		return -1;

	sb->fs_magic     = be32_to_cpu(super->fs_magic);
	sb->total_blocks = be32_to_cpu(super->fs_size);
+57 −57
Original line number Diff line number Diff line
@@ -497,7 +497,7 @@ xfs_qm_dqflush_all(
	int		error;

	if (mp->m_quotainfo == NULL)
		return (0);
		return 0;
	niters = 0;
again:
	xfs_qm_mplist_lock(mp);
@@ -528,7 +528,7 @@ xfs_qm_dqflush_all(
		error = xfs_qm_dqflush(dqp, flags);
		xfs_dqunlock(dqp);
		if (error)
			return (error);
			return error;

		xfs_qm_mplist_lock(mp);
		if (recl != XFS_QI_MPLRECLAIMS(mp)) {
@@ -540,7 +540,7 @@ xfs_qm_dqflush_all(

	xfs_qm_mplist_unlock(mp);
	/* return ! busy */
	return (0);
	return 0;
}
/*
 * Release the group dquot pointers the user dquots may be
@@ -599,7 +599,7 @@ xfs_qm_dqpurge_int(
	int		nmisses;

	if (mp->m_quotainfo == NULL)
		return (0);
		return 0;

	dqtype = (flags & XFS_QMOPT_UQUOTA) ? XFS_DQ_USER : 0;
	dqtype |= (flags & XFS_QMOPT_PQUOTA) ? XFS_DQ_PROJ : 0;
@@ -796,7 +796,7 @@ xfs_qm_dqattach_one(
			ASSERT(XFS_DQ_IS_LOCKED(dqp));
	}
#endif
	return (error);
	return error;
}


@@ -897,7 +897,7 @@ xfs_qm_dqattach(
	    (! XFS_NOT_DQATTACHED(mp, ip)) ||
	    (ip->i_ino == mp->m_sb.sb_uquotino) ||
	    (ip->i_ino == mp->m_sb.sb_gquotino))
		return (0);
		return 0;

	ASSERT((flags & XFS_QMOPT_ILOCKED) == 0 ||
	       XFS_ISLOCKED_INODE_EXCL(ip));
@@ -984,7 +984,7 @@ xfs_qm_dqattach(
	else
		ASSERT(XFS_ISLOCKED_INODE_EXCL(ip));
#endif
	return (error);
	return error;
}

/*
@@ -1049,7 +1049,7 @@ xfs_qm_sync(
	 */
	if (! XFS_IS_QUOTA_ON(mp)) {
		xfs_qm_mplist_unlock(mp);
		return (0);
		return 0;
	}
	FOREACH_DQUOT_IN_MP(dqp, mp) {
		/*
@@ -1109,9 +1109,9 @@ xfs_qm_sync(
		error = xfs_qm_dqflush(dqp, flush_flags);
		xfs_dqunlock(dqp);
		if (error && XFS_FORCED_SHUTDOWN(mp))
			return(0);	/* Need to prevent umount failure */
			return 0;	/* Need to prevent umount failure */
		else if (error)
			return (error);
			return error;

		xfs_qm_mplist_lock(mp);
		if (recl != XFS_QI_MPLRECLAIMS(mp)) {
@@ -1124,7 +1124,7 @@ xfs_qm_sync(
	}

	xfs_qm_mplist_unlock(mp);
	return (0);
	return 0;
}


@@ -1146,7 +1146,7 @@ xfs_qm_init_quotainfo(
	 * Tell XQM that we exist as soon as possible.
	 */
	if ((error = xfs_qm_hold_quotafs_ref(mp))) {
		return (error);
		return error;
	}

	qinf = mp->m_quotainfo = kmem_zalloc(sizeof(xfs_quotainfo_t), KM_SLEEP);
@@ -1158,7 +1158,7 @@ xfs_qm_init_quotainfo(
	if ((error = xfs_qm_init_quotainos(mp))) {
		kmem_free(qinf, sizeof(xfs_quotainfo_t));
		mp->m_quotainfo = NULL;
		return (error);
		return error;
	}

	spinlock_init(&qinf->qi_pinlock, "xfs_qinf_pin");
@@ -1232,7 +1232,7 @@ xfs_qm_init_quotainfo(
		qinf->qi_rtbwarnlimit = XFS_QM_RTBWARNLIMIT;
	}

	return (0);
	return 0;
}


@@ -1332,7 +1332,7 @@ xfs_qm_dqget_noattach(
			 */
			ASSERT(error != ESRCH);
			ASSERT(error != ENOENT);
			return (error);
			return error;
		}
		ASSERT(udqp);
	}
@@ -1355,7 +1355,7 @@ xfs_qm_dqget_noattach(
				xfs_qm_dqrele(udqp);
			ASSERT(error != ESRCH);
			ASSERT(error != ENOENT);
			return (error);
			return error;
		}
		ASSERT(gdqp);

@@ -1376,7 +1376,7 @@ xfs_qm_dqget_noattach(
	if (udqp) ASSERT(XFS_DQ_IS_LOCKED(udqp));
	if (gdqp) ASSERT(XFS_DQ_IS_LOCKED(gdqp));
#endif
	return (0);
	return 0;
}

/*
@@ -1404,7 +1404,7 @@ xfs_qm_qino_alloc(
				      XFS_TRANS_PERM_LOG_RES,
				      XFS_CREATE_LOG_COUNT))) {
		xfs_trans_cancel(tp, 0);
		return (error);
		return error;
	}
	memset(&zerocr, 0, sizeof(zerocr));
	memset(&zeroino, 0, sizeof(zeroino));
@@ -1413,7 +1413,7 @@ xfs_qm_qino_alloc(
				   &zerocr, 0, 1, ip, &committed))) {
		xfs_trans_cancel(tp, XFS_TRANS_RELEASE_LOG_RES |
				 XFS_TRANS_ABORT);
		return (error);
		return error;
	}

	/*
@@ -1461,9 +1461,9 @@ xfs_qm_qino_alloc(
	if ((error = xfs_trans_commit(tp, XFS_TRANS_RELEASE_LOG_RES,
				     NULL))) {
		xfs_fs_cmn_err(CE_ALERT, mp, "XFS qino_alloc failed!");
		return (error);
		return error;
	}
	return (0);
	return 0;
}


@@ -1508,7 +1508,7 @@ xfs_qm_reset_dqcounts(
		ddq = (xfs_disk_dquot_t *) ((xfs_dqblk_t *)ddq + 1);
	}

	return (0);
	return 0;
}

STATIC int
@@ -1557,7 +1557,7 @@ xfs_qm_dqiter_bufs(
		bno++;
		firstid += XFS_QM_DQPERBLK(mp);
	}
	return (error);
	return error;
}

/*
@@ -1586,7 +1586,7 @@ xfs_qm_dqiterate(
	 * happens only at mount time which is single threaded.
	 */
	if (qip->i_d.di_nblocks == 0)
		return (0);
		return 0;

	map = kmem_alloc(XFS_DQITER_MAP_SIZE * sizeof(*map), KM_SLEEP);

@@ -1655,7 +1655,7 @@ xfs_qm_dqiterate(

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

	return (error);
	return error;
}

/*
@@ -1715,7 +1715,7 @@ xfs_qm_get_rtblks(
	ifp = XFS_IFORK_PTR(ip, XFS_DATA_FORK);
	if (!(ifp->if_flags & XFS_IFEXTENTS)) {
		if ((error = xfs_iread_extents(NULL, ip, XFS_DATA_FORK)))
			return (error);
			return error;
	}
	rtblks = 0;
	nextents = ifp->if_bytes / sizeof(xfs_bmbt_rec_t);
@@ -1723,7 +1723,7 @@ xfs_qm_get_rtblks(
	for (ep = base; ep < &base[nextents]; ep++)
		rtblks += xfs_bmbt_get_blockcount(ep);
	*O_rtblks = (xfs_qcnt_t)rtblks;
	return (0);
	return 0;
}

/*
@@ -1767,7 +1767,7 @@ xfs_qm_dqusage_adjust(
	 */
	if ((error = xfs_iget(mp, NULL, ino, 0, XFS_ILOCK_EXCL, &ip, bno))) {
		*res = BULKSTAT_RV_NOTHING;
		return (error);
		return error;
	}

	if (ip->i_d.di_mode == 0) {
@@ -1785,7 +1785,7 @@ xfs_qm_dqusage_adjust(
	if ((error = xfs_qm_dqget_noattach(ip, &udqp, &gdqp))) {
		xfs_iput(ip, XFS_ILOCK_EXCL);
		*res = BULKSTAT_RV_GIVEUP;
		return (error);
		return error;
	}

	rtblks = 0;
@@ -1802,7 +1802,7 @@ xfs_qm_dqusage_adjust(
			if (gdqp)
				xfs_qm_dqput(gdqp);
			*res = BULKSTAT_RV_GIVEUP;
			return (error);
			return error;
		}
		nblks = (xfs_qcnt_t)ip->i_d.di_nblocks - rtblks;
	}
@@ -1847,7 +1847,7 @@ xfs_qm_dqusage_adjust(
	 * Goto next inode.
	 */
	*res = BULKSTAT_RV_DIDONE;
	return (0);
	return 0;
}

/*
@@ -2041,7 +2041,7 @@ xfs_qm_init_quotainos(
	XFS_QI_UQIP(mp) = uip;
	XFS_QI_GQIP(mp) = gip;

	return (0);
	return 0;
}


@@ -2062,7 +2062,7 @@ xfs_qm_shake_freelist(
	int		nflushes;

	if (howmany <= 0)
		return (0);
		return 0;

	nreclaimed = 0;
	restarts = 0;
@@ -2088,7 +2088,7 @@ xfs_qm_shake_freelist(
			xfs_dqunlock(dqp);
			xfs_qm_freelist_unlock(xfs_Gqm);
			if (++restarts >= XFS_QM_RECLAIM_MAX_RESTARTS)
				return (nreclaimed);
				return nreclaimed;
			XQM_STATS_INC(xqmstats.xs_qm_dqwants);
			goto tryagain;
		}
@@ -2163,7 +2163,7 @@ xfs_qm_shake_freelist(
			XFS_DQ_HASH_UNLOCK(hash);
			xfs_qm_freelist_unlock(xfs_Gqm);
			if (++restarts >= XFS_QM_RECLAIM_MAX_RESTARTS)
				return (nreclaimed);
				return nreclaimed;
			goto tryagain;
		}
		xfs_dqtrace_entry(dqp, "DQSHAKE: UNLINKING");
@@ -2188,7 +2188,7 @@ xfs_qm_shake_freelist(
		dqp = nextdqp;
	}
	xfs_qm_freelist_unlock(xfs_Gqm);
	return (nreclaimed);
	return nreclaimed;
}


@@ -2202,9 +2202,9 @@ xfs_qm_shake(int nr_to_scan, gfp_t gfp_mask)
	int	ndqused, nfree, n;

	if (!kmem_shake_allow(gfp_mask))
		return (0);
		return 0;
	if (!xfs_Gqm)
		return (0);
		return 0;

	nfree = xfs_Gqm->qm_dqfreelist.qh_nelems; /* free dquots */
	/* incore dquots in all f/s's */
@@ -2213,7 +2213,7 @@ xfs_qm_shake(int nr_to_scan, gfp_t gfp_mask)
	ASSERT(ndqused >= 0);

	if (nfree <= ndqused && nfree < ndquot)
		return (0);
		return 0;

	ndqused *= xfs_Gqm->qm_dqfree_ratio;	/* target # of free dquots */
	n = nfree - ndqused - ndquot;		/* # over target */
@@ -2257,7 +2257,7 @@ xfs_qm_dqreclaim_one(void)
			xfs_dqunlock(dqp);
			xfs_qm_freelist_unlock(xfs_Gqm);
			if (++restarts >= XFS_QM_RECLAIM_MAX_RESTARTS)
				return (NULL);
				return NULL;
			XQM_STATS_INC(xqmstats.xs_qm_dqwants);
			goto startagain;
		}
@@ -2333,7 +2333,7 @@ xfs_qm_dqreclaim_one(void)
	}

	xfs_qm_freelist_unlock(xfs_Gqm);
	return (dqpout);
	return dqpout;
}


@@ -2369,7 +2369,7 @@ xfs_qm_dqalloc_incore(
			 */
			memset(&dqp->q_core, 0, sizeof(dqp->q_core));
			*O_dqpp = dqp;
			return (B_FALSE);
			return B_FALSE;
		}
		XQM_STATS_INC(xqmstats.xs_qm_dqreclaim_misses);
	}
@@ -2382,7 +2382,7 @@ xfs_qm_dqalloc_incore(
	*O_dqpp = kmem_zone_zalloc(xfs_Gqm->qm_dqzone, KM_SLEEP);
	atomic_inc(&xfs_Gqm->qm_totaldquots);

	return (B_TRUE);
	return B_TRUE;
}


@@ -2407,13 +2407,13 @@ xfs_qm_write_sb_changes(
				      0,
				      XFS_DEFAULT_LOG_COUNT))) {
		xfs_trans_cancel(tp, 0);
		return (error);
		return error;
	}

	xfs_mod_sb(tp, flags);
	(void) xfs_trans_commit(tp, 0, NULL);

	return (0);
	return 0;
}


@@ -2463,7 +2463,7 @@ xfs_qm_vop_dqalloc(
		if ((error = xfs_qm_dqattach(ip, XFS_QMOPT_DQALLOC |
					    XFS_QMOPT_ILOCKED))) {
			xfs_iunlock(ip, lockflags);
			return (error);
			return error;
		}
	}

@@ -2486,7 +2486,7 @@ xfs_qm_vop_dqalloc(
						 XFS_QMOPT_DOWARN,
						 &uq))) {
				ASSERT(error != ENOENT);
				return (error);
				return error;
			}
			/*
			 * Get the ilock in the right order.
@@ -2517,7 +2517,7 @@ xfs_qm_vop_dqalloc(
				if (uq)
					xfs_qm_dqrele(uq);
				ASSERT(error != ENOENT);
				return (error);
				return error;
			}
			xfs_dqunlock(gq);
			lockflags = XFS_ILOCK_SHARED;
@@ -2565,7 +2565,7 @@ xfs_qm_vop_dqalloc(
		*O_gdqpp = gq;
	else if (gq)
		xfs_qm_dqrele(gq);
	return (0);
	return 0;
}

/*
@@ -2608,7 +2608,7 @@ xfs_qm_vop_chown(
	xfs_dqunlock(newdq);
	*IO_olddq = newdq;

	return (prevdq);
	return prevdq;
}

/*
@@ -2702,12 +2702,12 @@ xfs_qm_vop_rename_dqattach(
	ip = i_tab[0];

	if (! XFS_IS_QUOTA_ON(ip->i_mount))
		return (0);
		return 0;

	if (XFS_NOT_DQATTACHED(ip->i_mount, ip)) {
		error = xfs_qm_dqattach(ip, 0);
		if (error)
			return (error);
			return error;
	}
	for (i = 1; (i < 4 && i_tab[i]); i++) {
		/*
@@ -2717,11 +2717,11 @@ xfs_qm_vop_rename_dqattach(
			if (XFS_NOT_DQATTACHED(ip->i_mount, ip)) {
				error = xfs_qm_dqattach(ip, 0);
				if (error)
					return (error);
					return error;
			}
		}
	}
	return (0);
	return 0;
}

void
@@ -2834,7 +2834,7 @@ xfs_qm_dqhashlock_nowait(
	int locked;

	locked = mutex_trylock(&((dqp)->q_hash->qh_lock));
	return (locked);
	return locked;
}

int
@@ -2844,7 +2844,7 @@ xfs_qm_freelist_lock_nowait(
	int locked;

	locked = mutex_trylock(&(xqm->qm_dqfreelist.qh_lock));
	return (locked);
	return locked;
}

STATIC int
@@ -2855,5 +2855,5 @@ xfs_qm_mplist_nowait(

	ASSERT(mp->m_quotainfo);
	locked = mutex_trylock(&(XFS_QI_MPLLOCK(mp)));
	return (locked);
	return locked;
}
+48 −48

File changed.

Preview size limit exceeded, changes collapsed.

Loading