Re: [PATCH] eventfd: use wait_event_interruptible_locked_irq() helper

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Feb 16, 2023 at 01:29:00PM +0000, Matthew Wilcox wrote:
> On Thu, Feb 16, 2023 at 09:17:39PM +0800, wenyang.linux@xxxxxxxxxxx wrote:
> > +		res = wait_event_interruptible_locked_irq(
> > +				ctx->wqh, ULLONG_MAX - ctx->count > ucnt) ?
> > +			-ERESTARTSYS : sizeof(ucnt);
> 
> You've broken the line here in a weird way.  I'd've done it as:
> 
> 		res = wait_event_interruptible_locked_irq(ctx->wqh,
> 				ULLONG_MAX - ctx->count > ucnt) ?
> 					-ERESTARTSYS : sizeof(ucnt));
> 
> ... also the patch you've sent here doesn't even compile.  Have you
> tested it?

Sorry, I misread it.  But I would have avoided use of the ?: operator
here ...

		res = wait_event_interruptible_locked_irq(ctx->wqh,
				ULLONG_MAX - ctx->count > ucnt);
		if (res == 0)
			res = sizeof(ucnt);



[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux