Re: [PATCH 3/8] xfs: handle kmalloc failure when reading attrs

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

 



On Fri, Mar 02, 2012 at 08:49:38PM +1100, Dave Chinner wrote:
> That only handles vmalloced memory, but kmem_free()
> handles both kmalloc() and vmalloc() memory:
> 
> void
> kmem_free(const void *ptr)
> {
>         if (!is_vmalloc_addr(ptr)) {
>                 kfree(ptr);
>         } else {
>                 vfree(ptr);
>         }
> }
> 
> Avoiding having to open code this vmalloc check is exactly why I
> chose kmem_free() here ;)

Oh - this should have been removed when I changed kmem_alloc to not use
vmalloc anymore.  I'd really prefer to have this kind of check in the
callers as it should be the exception, not the rule.

_______________________________________________
xfs mailing list
xfs@xxxxxxxxxxx
http://oss.sgi.com/mailman/listinfo/xfs


[Index of Archives]     [Linux XFS Devel]     [Linux Filesystem Development]     [Filesystem Testing]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux