Re: [PATCH 4/12: eCryptfs] Main module functions

From: Anton Altaparmakov
Date: Sun Nov 20 2005 - 10:34:21 EST


On Sat, 19 Nov 2005, Pekka Enberg wrote:
> On 11/19/05, Phillip Hellewell <phillip@xxxxxxxxxxxxxxxxxxxx> wrote:
> > + BUG();
> > + err = -EINVAL;
> > + goto out;
>
> Why do you want to BUG() and then handle the situation?

Because you can define BUG() to nothing (on embedded builds for example)
and then you would be screwed if you don't handle the error gracefully.
You should never assume something does not return, except perhaps a
panic() although someone might even get rid of that one day...

Best regards,

Anton
--
Anton Altaparmakov <aia21 at cam.ac.uk> (replace at with @)
Unix Support, Computing Service, University of Cambridge, CB2 3QH, UK
Linux NTFS maintainer / IRC: #ntfs on irc.freenode.net
WWW: http://linux-ntfs.sf.net/ & http://www-stu.christs.cam.ac.uk/~aia21/
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/