linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Checking of NULL with __GFP_NOFAIL in kzalloc()
@ 2009-03-01  6:05 Manish Katiyar
  2009-03-02  6:08 ` Manish Katiyar
  0 siblings, 1 reply; 5+ messages in thread
From: Manish Katiyar @ 2009-03-01  6:05 UTC (permalink / raw)
  To: ext4

Hi,

While going through jbd code, I was wondering why do we need to check
new_transaction for NULL, if we are passing __GFP_NOFAIL ?
Last code change around this code was when Ted converted kmalloc to
kzalloc, but since he also didn't remove it I am guessing there would
be some good reason for it. Can someone enlighten me ?

start_this_handle() {
..........
	..........
	new_transaction = kzalloc(sizeof(*new_transaction),
			GFP_NOFS|__GFP_NOFAIL);
        if (!new_transaction) {
        	ret = -ENOMEM;
        	goto out;
        }
	..........
}
		

Thanks -
Manish

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2009-03-02 13:44 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-01  6:05 Checking of NULL with __GFP_NOFAIL in kzalloc() Manish Katiyar
2009-03-02  6:08 ` Manish Katiyar
2009-03-02  7:35   ` Andreas Dilger
2009-03-02  8:15     ` Manish Katiyar
2009-03-02 13:44   ` Theodore Tso

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).