[PATCH 3/8] xfs: handle kmalloc failure when reading attrs
Christoph Hellwig
hch at infradead.org
Fri Mar 2 01:49:20 CST 2012
I think the subject should be more like:
xfs: fallback to vmalloc for large buffers in xfs_attrmulti_attr_get
> + kbuf = kmem_zalloc(*len, KM_SLEEP | KM_MAYFAIL);
> + if (!kbuf) {
> + kbuf = kmem_zalloc_large(*len);
> + if (!kbuf)
> + return ENOMEM;
> + }
>
> error = xfs_attr_get(XFS_I(inode), name, kbuf, (int *)len, flags);
> if (error)
> @@ -457,7 +460,7 @@ xfs_attrmulti_attr_get(
> error = EFAULT;
>
> out_kfree:
> - kfree(kbuf);
> + kmem_free(kbuf);
kmem_free doesn't handle vmalloced buffers from kmem_zalloc_large, you
need to use kmem_free_large for them.
More information about the xfs
mailing list