Changeset View
Changeset View
Standalone View
Standalone View
sys/contrib/openzfs/module/os/linux/zfs/zpl_inode.c
Show First 20 Lines • Show All 493 Lines • ▼ Show 20 Lines | zpl_get_link_common(struct dentry *dentry, struct inode *ip, char **link) | ||||
crhold(cr); | crhold(cr); | ||||
*link = NULL; | *link = NULL; | ||||
struct iovec iov; | struct iovec iov; | ||||
iov.iov_len = MAXPATHLEN; | iov.iov_len = MAXPATHLEN; | ||||
iov.iov_base = kmem_zalloc(MAXPATHLEN, KM_SLEEP); | iov.iov_base = kmem_zalloc(MAXPATHLEN, KM_SLEEP); | ||||
uio_t uio; | zfs_uio_t uio; | ||||
uio_iovec_init(&uio, &iov, 1, 0, UIO_SYSSPACE, MAXPATHLEN - 1, 0); | zfs_uio_iovec_init(&uio, &iov, 1, 0, UIO_SYSSPACE, MAXPATHLEN - 1, 0); | ||||
cookie = spl_fstrans_mark(); | cookie = spl_fstrans_mark(); | ||||
error = -zfs_readlink(ip, &uio, cr); | error = -zfs_readlink(ip, &uio, cr); | ||||
spl_fstrans_unmark(cookie); | spl_fstrans_unmark(cookie); | ||||
crfree(cr); | crfree(cr); | ||||
if (error) | if (error) | ||||
kmem_free(iov.iov_base, MAXPATHLEN); | kmem_free(iov.iov_base, MAXPATHLEN); | ||||
▲ Show 20 Lines • Show All 234 Lines • Show Last 20 Lines |