lkml.org 
[lkml]   [2005]   [Jun]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 3/4] files: change fd_install assertion
On Fri, Jun 24, 2005 at 04:04:37PM +0400, Artem B. Bityuckiy wrote:
> Dipankar Sarma wrote:
> >- if (unlikely(fdt->fd[fd] != NULL))
> >- BUG();
> >+ BUG_ON(fdt->fd[fd] != NULL);
> > rcu_assign_pointer(fdt->fd[fd], file);
> > spin_unlock(&files->file_lock);
> > }
> >
> Why is this better ?

Because that way the compare and branch can be ifdefed out when CONFIG_BUG is
not set. Not to mention BUG_ON() looks more like an assertion.

Thanks
Dipankar
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-06-24 15:11    [W:0.050 / U:0.364 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site