Checking of NULL with __GFP_NOFAIL in kzalloc()

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

 



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
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Reiser Filesystem Development]     [Ceph FS]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite National Park]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]     [Linux Media]

  Powered by Linux