Re: [patch 6/6] mm: fsync livelock avoidance

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

 



On Thu, 11 Dec 2008 23:32:13 +0100
Nick Piggin <npiggin@xxxxxxx> wrote:

> > > +			/* nothing tagged */
> > > +			spin_unlock_irq(&mapping->tree_lock);
> > > +			return 0;
> > 
> > Can we please avoid the deeply-nested-return hand grenade?
> 
> Hmm, we could 
> 
>    goto out;
> ...
> out:
>  return ret;
> 
> But is that less hand grenadie than the plain return?

yep.  I've seen many many locking errors and resource leaks caused by
the multiple-return-statements mistake.

--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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