81 * Morover, the vnode ops must work in both normal and log replay context. |
81 * Morover, the vnode ops must work in both normal and log replay context. |
82 * The ordering of events is important to avoid deadlocks and references |
82 * The ordering of events is important to avoid deadlocks and references |
83 * to freed memory. The example below illustrates the following Big Rules: |
83 * to freed memory. The example below illustrates the following Big Rules: |
84 * |
84 * |
85 * (1) A check must be made in each zfs thread for a mounted file system. |
85 * (1) A check must be made in each zfs thread for a mounted file system. |
86 * This is done avoiding races using ZFS_ENTER(zfsvfs). |
86 * This is done avoiding races using ZFS_ENTER(zfsvfs) or |
87 * A ZFS_EXIT(zfsvfs) is needed before all returns. |
87 * ZFS_ENTER_VERIFY(zfsvfs, zp). A ZFS_EXIT(zfsvfs) is needed before |
|
88 * all returns. |
88 * |
89 * |
89 * (2) VN_RELE() should always be the last thing except for zil_commit() |
90 * (2) VN_RELE() should always be the last thing except for zil_commit() |
90 * (if necessary) and ZFS_EXIT(). This is for 3 reasons: |
91 * (if necessary) and ZFS_EXIT(). This is for 3 reasons: |
91 * First, if it's the last reference, the vnode/znode |
92 * First, if it's the last reference, the vnode/znode |
92 * can be freed, so the zp may point to freed memory. Second, the last |
93 * can be freed, so the zp may point to freed memory. Second, the last |
255 case _FIO_SEEK_DATA: |
257 case _FIO_SEEK_DATA: |
256 case _FIO_SEEK_HOLE: |
258 case _FIO_SEEK_HOLE: |
257 if (ddi_copyin((void *)data, &off, sizeof (off), flag)) |
259 if (ddi_copyin((void *)data, &off, sizeof (off), flag)) |
258 return (EFAULT); |
260 return (EFAULT); |
259 |
261 |
260 zfsvfs = VTOZ(vp)->z_zfsvfs; |
262 zp = VTOZ(vp); |
261 ZFS_ENTER(zfsvfs); |
263 zfsvfs = zp->z_zfsvfs; |
|
264 ZFS_ENTER_VERIFY_ZP(zfsvfs, zp); |
262 |
265 |
263 /* offset parameter is in/out */ |
266 /* offset parameter is in/out */ |
264 error = zfs_holey(vp, com, &off); |
267 error = zfs_holey(vp, com, &off); |
265 ZFS_EXIT(zfsvfs); |
268 ZFS_EXIT(zfsvfs); |
266 if (error) |
269 if (error) |
396 static int |
399 static int |
397 zfs_read(vnode_t *vp, uio_t *uio, int ioflag, cred_t *cr, caller_context_t *ct) |
400 zfs_read(vnode_t *vp, uio_t *uio, int ioflag, cred_t *cr, caller_context_t *ct) |
398 { |
401 { |
399 znode_t *zp = VTOZ(vp); |
402 znode_t *zp = VTOZ(vp); |
400 zfsvfs_t *zfsvfs = zp->z_zfsvfs; |
403 zfsvfs_t *zfsvfs = zp->z_zfsvfs; |
401 objset_t *os = zfsvfs->z_os; |
404 objset_t *os; |
402 ssize_t n, nbytes; |
405 ssize_t n, nbytes; |
403 int error; |
406 int error; |
404 rl_t *rl; |
407 rl_t *rl; |
405 |
408 |
406 ZFS_ENTER(zfsvfs); |
409 ZFS_ENTER_VERIFY_ZP(zfsvfs, zp); |
|
410 os = zfsvfs->z_os; |
407 |
411 |
408 /* |
412 /* |
409 * Validate file offset |
413 * Validate file offset |
410 */ |
414 */ |
411 if (uio->uio_loffset < (offset_t)0) { |
415 if (uio->uio_loffset < (offset_t)0) { |
1042 zfs_create(vnode_t *dvp, char *name, vattr_t *vap, vcexcl_t excl, |
1047 zfs_create(vnode_t *dvp, char *name, vattr_t *vap, vcexcl_t excl, |
1043 int mode, vnode_t **vpp, cred_t *cr, int flag) |
1048 int mode, vnode_t **vpp, cred_t *cr, int flag) |
1044 { |
1049 { |
1045 znode_t *zp, *dzp = VTOZ(dvp); |
1050 znode_t *zp, *dzp = VTOZ(dvp); |
1046 zfsvfs_t *zfsvfs = dzp->z_zfsvfs; |
1051 zfsvfs_t *zfsvfs = dzp->z_zfsvfs; |
1047 zilog_t *zilog = zfsvfs->z_log; |
1052 zilog_t *zilog; |
1048 objset_t *os = zfsvfs->z_os; |
1053 objset_t *os; |
1049 zfs_dirlock_t *dl; |
1054 zfs_dirlock_t *dl; |
1050 dmu_tx_t *tx; |
1055 dmu_tx_t *tx; |
1051 int error; |
1056 int error; |
1052 uint64_t zoid; |
1057 uint64_t zoid; |
1053 |
1058 |
1054 ZFS_ENTER(zfsvfs); |
1059 ZFS_ENTER_VERIFY_ZP(zfsvfs, dzp); |
|
1060 os = zfsvfs->z_os; |
|
1061 zilog = zfsvfs->z_log; |
1055 |
1062 |
1056 top: |
1063 top: |
1057 *vpp = NULL; |
1064 *vpp = NULL; |
1058 |
1065 |
1059 if ((vap->va_mode & VSVTX) && secpolicy_vnode_stky_modify(cr)) |
1066 if ((vap->va_mode & VSVTX) && secpolicy_vnode_stky_modify(cr)) |
1219 { |
1226 { |
1220 znode_t *zp, *dzp = VTOZ(dvp); |
1227 znode_t *zp, *dzp = VTOZ(dvp); |
1221 znode_t *xzp = NULL; |
1228 znode_t *xzp = NULL; |
1222 vnode_t *vp; |
1229 vnode_t *vp; |
1223 zfsvfs_t *zfsvfs = dzp->z_zfsvfs; |
1230 zfsvfs_t *zfsvfs = dzp->z_zfsvfs; |
1224 zilog_t *zilog = zfsvfs->z_log; |
1231 zilog_t *zilog; |
1225 uint64_t acl_obj, xattr_obj; |
1232 uint64_t acl_obj, xattr_obj; |
1226 zfs_dirlock_t *dl; |
1233 zfs_dirlock_t *dl; |
1227 dmu_tx_t *tx; |
1234 dmu_tx_t *tx; |
1228 boolean_t may_delete_now, delete_now = FALSE; |
1235 boolean_t may_delete_now, delete_now = FALSE; |
1229 boolean_t unlinked; |
1236 boolean_t unlinked; |
1230 int error; |
1237 int error; |
1231 |
1238 |
1232 ZFS_ENTER(zfsvfs); |
1239 ZFS_ENTER_VERIFY_ZP(zfsvfs, dzp); |
|
1240 zilog = zfsvfs->z_log; |
1233 |
1241 |
1234 top: |
1242 top: |
1235 /* |
1243 /* |
1236 * Attempt to lock directory; fail if entry doesn't exist. |
1244 * Attempt to lock directory; fail if entry doesn't exist. |
1237 */ |
1245 */ |
1384 static int |
1392 static int |
1385 zfs_mkdir(vnode_t *dvp, char *dirname, vattr_t *vap, vnode_t **vpp, cred_t *cr) |
1393 zfs_mkdir(vnode_t *dvp, char *dirname, vattr_t *vap, vnode_t **vpp, cred_t *cr) |
1386 { |
1394 { |
1387 znode_t *zp, *dzp = VTOZ(dvp); |
1395 znode_t *zp, *dzp = VTOZ(dvp); |
1388 zfsvfs_t *zfsvfs = dzp->z_zfsvfs; |
1396 zfsvfs_t *zfsvfs = dzp->z_zfsvfs; |
1389 zilog_t *zilog = zfsvfs->z_log; |
1397 zilog_t *zilog; |
1390 zfs_dirlock_t *dl; |
1398 zfs_dirlock_t *dl; |
1391 uint64_t zoid = 0; |
1399 uint64_t zoid = 0; |
1392 dmu_tx_t *tx; |
1400 dmu_tx_t *tx; |
1393 int error; |
1401 int error; |
1394 |
1402 |
1395 ASSERT(vap->va_type == VDIR); |
1403 ASSERT(vap->va_type == VDIR); |
1396 |
1404 |
1397 ZFS_ENTER(zfsvfs); |
1405 ZFS_ENTER_VERIFY_ZP(zfsvfs, dzp); |
|
1406 zilog = zfsvfs->z_log; |
1398 |
1407 |
1399 if (dzp->z_phys->zp_flags & ZFS_XATTR) { |
1408 if (dzp->z_phys->zp_flags & ZFS_XATTR) { |
1400 ZFS_EXIT(zfsvfs); |
1409 ZFS_EXIT(zfsvfs); |
1401 return (EINVAL); |
1410 return (EINVAL); |
1402 } |
1411 } |
1810 (vp->v_type == VREG) && !(IS_SWAPVP(vp))) |
1820 (vp->v_type == VREG) && !(IS_SWAPVP(vp))) |
1811 (void) VOP_PUTPAGE(vp, (offset_t)0, (size_t)0, B_ASYNC, cr); |
1821 (void) VOP_PUTPAGE(vp, (offset_t)0, (size_t)0, B_ASYNC, cr); |
1812 |
1822 |
1813 (void) tsd_set(zfs_fsyncer_key, (void *)zfs_fsync_sync_cnt); |
1823 (void) tsd_set(zfs_fsyncer_key, (void *)zfs_fsync_sync_cnt); |
1814 |
1824 |
1815 ZFS_ENTER(zfsvfs); |
1825 ZFS_ENTER_VERIFY_ZP(zfsvfs, zp); |
1816 zil_commit(zfsvfs->z_log, zp->z_last_itx, zp->z_id); |
1826 zil_commit(zfsvfs->z_log, zp->z_last_itx, zp->z_id); |
1817 ZFS_EXIT(zfsvfs); |
1827 ZFS_EXIT(zfsvfs); |
1818 return (0); |
1828 return (0); |
1819 } |
1829 } |
1820 |
1830 |
1835 static int |
1845 static int |
1836 zfs_getattr(vnode_t *vp, vattr_t *vap, int flags, cred_t *cr) |
1846 zfs_getattr(vnode_t *vp, vattr_t *vap, int flags, cred_t *cr) |
1837 { |
1847 { |
1838 znode_t *zp = VTOZ(vp); |
1848 znode_t *zp = VTOZ(vp); |
1839 zfsvfs_t *zfsvfs = zp->z_zfsvfs; |
1849 zfsvfs_t *zfsvfs = zp->z_zfsvfs; |
1840 znode_phys_t *pzp = zp->z_phys; |
1850 znode_phys_t *pzp; |
1841 int error; |
1851 int error; |
1842 uint64_t links; |
1852 uint64_t links; |
1843 |
1853 |
1844 ZFS_ENTER(zfsvfs); |
1854 ZFS_ENTER_VERIFY_ZP(zfsvfs, zp); |
|
1855 pzp = zp->z_phys; |
1845 |
1856 |
1846 /* |
1857 /* |
1847 * Return all attributes. It's cheaper to provide the answer |
1858 * Return all attributes. It's cheaper to provide the answer |
1848 * than to determine whether we were asked the question. |
1859 * than to determine whether we were asked the question. |
1849 */ |
1860 */ |
1915 /* ARGSUSED */ |
1926 /* ARGSUSED */ |
1916 static int |
1927 static int |
1917 zfs_setattr(vnode_t *vp, vattr_t *vap, int flags, cred_t *cr, |
1928 zfs_setattr(vnode_t *vp, vattr_t *vap, int flags, cred_t *cr, |
1918 caller_context_t *ct) |
1929 caller_context_t *ct) |
1919 { |
1930 { |
1920 struct znode *zp = VTOZ(vp); |
1931 znode_t *zp = VTOZ(vp); |
1921 znode_phys_t *pzp = zp->z_phys; |
1932 znode_phys_t *pzp; |
1922 zfsvfs_t *zfsvfs = zp->z_zfsvfs; |
1933 zfsvfs_t *zfsvfs = zp->z_zfsvfs; |
1923 zilog_t *zilog = zfsvfs->z_log; |
1934 zilog_t *zilog; |
1924 dmu_tx_t *tx; |
1935 dmu_tx_t *tx; |
1925 vattr_t oldva; |
1936 vattr_t oldva; |
1926 uint_t mask = vap->va_mask; |
1937 uint_t mask = vap->va_mask; |
1927 uint_t saved_mask; |
1938 uint_t saved_mask; |
1928 int trim_mask = 0; |
1939 int trim_mask = 0; |
2296 zfs_rename(vnode_t *sdvp, char *snm, vnode_t *tdvp, char *tnm, cred_t *cr) |
2309 zfs_rename(vnode_t *sdvp, char *snm, vnode_t *tdvp, char *tnm, cred_t *cr) |
2297 { |
2310 { |
2298 znode_t *tdzp, *szp, *tzp; |
2311 znode_t *tdzp, *szp, *tzp; |
2299 znode_t *sdzp = VTOZ(sdvp); |
2312 znode_t *sdzp = VTOZ(sdvp); |
2300 zfsvfs_t *zfsvfs = sdzp->z_zfsvfs; |
2313 zfsvfs_t *zfsvfs = sdzp->z_zfsvfs; |
2301 zilog_t *zilog = zfsvfs->z_log; |
2314 zilog_t *zilog; |
2302 vnode_t *realvp; |
2315 vnode_t *realvp; |
2303 zfs_dirlock_t *sdl, *tdl; |
2316 zfs_dirlock_t *sdl, *tdl; |
2304 dmu_tx_t *tx; |
2317 dmu_tx_t *tx; |
2305 zfs_zlock_t *zl; |
2318 zfs_zlock_t *zl; |
2306 int cmp, serr, terr, error; |
2319 int cmp, serr, terr, error; |
2307 |
2320 |
2308 ZFS_ENTER(zfsvfs); |
2321 ZFS_ENTER_VERIFY_ZP(zfsvfs, sdzp); |
|
2322 zilog = zfsvfs->z_log; |
2309 |
2323 |
2310 /* |
2324 /* |
2311 * Make sure we have the real vp for the target directory. |
2325 * Make sure we have the real vp for the target directory. |
2312 */ |
2326 */ |
2313 if (VOP_REALVP(tdvp, &realvp) == 0) |
2327 if (VOP_REALVP(tdvp, &realvp) == 0) |
2527 { |
2545 { |
2528 znode_t *zp, *dzp = VTOZ(dvp); |
2546 znode_t *zp, *dzp = VTOZ(dvp); |
2529 zfs_dirlock_t *dl; |
2547 zfs_dirlock_t *dl; |
2530 dmu_tx_t *tx; |
2548 dmu_tx_t *tx; |
2531 zfsvfs_t *zfsvfs = dzp->z_zfsvfs; |
2549 zfsvfs_t *zfsvfs = dzp->z_zfsvfs; |
2532 zilog_t *zilog = zfsvfs->z_log; |
2550 zilog_t *zilog; |
2533 uint64_t zoid; |
2551 uint64_t zoid; |
2534 int len = strlen(link); |
2552 int len = strlen(link); |
2535 int error; |
2553 int error; |
2536 |
2554 |
2537 ASSERT(vap->va_type == VLNK); |
2555 ASSERT(vap->va_type == VLNK); |
2538 |
2556 |
2539 ZFS_ENTER(zfsvfs); |
2557 ZFS_ENTER_VERIFY_ZP(zfsvfs, dzp); |
|
2558 zilog = zfsvfs->z_log; |
2540 top: |
2559 top: |
2541 if (error = zfs_zaccess(dzp, ACE_ADD_FILE, cr)) { |
2560 if (error = zfs_zaccess(dzp, ACE_ADD_FILE, cr)) { |
2542 ZFS_EXIT(zfsvfs); |
2561 ZFS_EXIT(zfsvfs); |
2543 return (error); |
2562 return (error); |
2544 } |
2563 } |
2648 znode_t *zp = VTOZ(vp); |
2667 znode_t *zp = VTOZ(vp); |
2649 zfsvfs_t *zfsvfs = zp->z_zfsvfs; |
2668 zfsvfs_t *zfsvfs = zp->z_zfsvfs; |
2650 size_t bufsz; |
2669 size_t bufsz; |
2651 int error; |
2670 int error; |
2652 |
2671 |
2653 ZFS_ENTER(zfsvfs); |
2672 ZFS_ENTER_VERIFY_ZP(zfsvfs, zp); |
2654 |
2673 |
2655 bufsz = (size_t)zp->z_phys->zp_size; |
2674 bufsz = (size_t)zp->z_phys->zp_size; |
2656 if (bufsz + sizeof (znode_phys_t) <= zp->z_dbuf->db_size) { |
2675 if (bufsz + sizeof (znode_phys_t) <= zp->z_dbuf->db_size) { |
2657 error = uiomove(zp->z_phys + 1, |
2676 error = uiomove(zp->z_phys + 1, |
2658 MIN((size_t)bufsz, uio->uio_resid), UIO_READ, uio); |
2677 MIN((size_t)bufsz, uio->uio_resid), UIO_READ, uio); |
2693 zfs_link(vnode_t *tdvp, vnode_t *svp, char *name, cred_t *cr) |
2712 zfs_link(vnode_t *tdvp, vnode_t *svp, char *name, cred_t *cr) |
2694 { |
2713 { |
2695 znode_t *dzp = VTOZ(tdvp); |
2714 znode_t *dzp = VTOZ(tdvp); |
2696 znode_t *tzp, *szp; |
2715 znode_t *tzp, *szp; |
2697 zfsvfs_t *zfsvfs = dzp->z_zfsvfs; |
2716 zfsvfs_t *zfsvfs = dzp->z_zfsvfs; |
2698 zilog_t *zilog = zfsvfs->z_log; |
2717 zilog_t *zilog; |
2699 zfs_dirlock_t *dl; |
2718 zfs_dirlock_t *dl; |
2700 dmu_tx_t *tx; |
2719 dmu_tx_t *tx; |
2701 vnode_t *realvp; |
2720 vnode_t *realvp; |
2702 int error; |
2721 int error; |
2703 |
2722 |
2704 ASSERT(tdvp->v_type == VDIR); |
2723 ASSERT(tdvp->v_type == VDIR); |
2705 |
2724 |
2706 ZFS_ENTER(zfsvfs); |
2725 ZFS_ENTER_VERIFY_ZP(zfsvfs, dzp); |
|
2726 zilog = zfsvfs->z_log; |
2707 |
2727 |
2708 if (VOP_REALVP(svp, &realvp) == 0) |
2728 if (VOP_REALVP(svp, &realvp) == 0) |
2709 svp = realvp; |
2729 svp = realvp; |
2710 |
2730 |
2711 if (svp->v_vfsp != tdvp->v_vfsp) { |
2731 if (svp->v_vfsp != tdvp->v_vfsp) { |
2712 ZFS_EXIT(zfsvfs); |
2732 ZFS_EXIT(zfsvfs); |
2713 return (EXDEV); |
2733 return (EXDEV); |
2714 } |
2734 } |
2715 |
2735 |
2716 szp = VTOZ(svp); |
2736 szp = VTOZ(svp); |
|
2737 if (!szp->z_dbuf_held) { |
|
2738 ZFS_EXIT(zfsvfs); |
|
2739 return (EIO); |
|
2740 } |
2717 top: |
2741 top: |
2718 /* |
2742 /* |
2719 * We do not support links between attributes and non-attributes |
2743 * We do not support links between attributes and non-attributes |
2720 * because of the potential security risk of creating links |
2744 * because of the potential security risk of creating links |
2721 * into "normal" file space in order to circumvent restrictions |
2745 * into "normal" file space in order to circumvent restrictions |
3003 { |
3027 { |
3004 znode_t *zp = VTOZ(vp); |
3028 znode_t *zp = VTOZ(vp); |
3005 zfsvfs_t *zfsvfs = zp->z_zfsvfs; |
3029 zfsvfs_t *zfsvfs = zp->z_zfsvfs; |
3006 int error; |
3030 int error; |
3007 |
3031 |
3008 rw_enter(&zfsvfs->z_unmount_inactive_lock, RW_READER); |
3032 rw_enter(&zfsvfs->z_teardown_inactive_lock, RW_READER); |
3009 if (zfsvfs->z_unmounted) { |
3033 if (zp->z_dbuf_held == 0) { |
3010 ASSERT(zp->z_dbuf_held == 0); |
|
3011 |
|
3012 if (vn_has_cached_data(vp)) { |
3034 if (vn_has_cached_data(vp)) { |
3013 (void) pvn_vplist_dirty(vp, 0, zfs_null_putapage, |
3035 (void) pvn_vplist_dirty(vp, 0, zfs_null_putapage, |
3014 B_INVAL, cr); |
3036 B_INVAL, cr); |
3015 } |
3037 } |
3016 |
3038 |
3085 { |
3107 { |
3086 znode_t *zp = VTOZ(vp); |
3108 znode_t *zp = VTOZ(vp); |
3087 zfsvfs_t *zfsvfs = zp->z_zfsvfs; |
3109 zfsvfs_t *zfsvfs = zp->z_zfsvfs; |
3088 int error; |
3110 int error; |
3089 |
3111 |
3090 ZFS_ENTER(zfsvfs); |
3112 ZFS_ENTER_VERIFY_ZP(zfsvfs, zp); |
3091 |
3113 |
3092 /* |
3114 /* |
3093 * We are following the UFS semantics with respect to mapcnt |
3115 * We are following the UFS semantics with respect to mapcnt |
3094 * here: If we see that the file is mapped already, then we will |
3116 * here: If we see that the file is mapped already, then we will |
3095 * return an error, but we don't worry about races between this |
3117 * return an error, but we don't worry about races between this |
3237 zfsvfs_t *zfsvfs = zp->z_zfsvfs; |
3259 zfsvfs_t *zfsvfs = zp->z_zfsvfs; |
3238 page_t *pp, **pl0 = pl; |
3260 page_t *pp, **pl0 = pl; |
3239 int need_unlock = 0, err = 0; |
3261 int need_unlock = 0, err = 0; |
3240 offset_t orig_off; |
3262 offset_t orig_off; |
3241 |
3263 |
3242 ZFS_ENTER(zfsvfs); |
3264 ZFS_ENTER_VERIFY_ZP(zfsvfs, zp); |
3243 |
3265 |
3244 if (protp) |
3266 if (protp) |
3245 *protp = PROT_ALL; |
3267 *protp = PROT_ALL; |
3246 |
3268 |
3247 ASSERT(zp->z_dbuf_held && zp->z_phys); |
3269 ASSERT(zp->z_dbuf_held && zp->z_phys); |
3540 static int |
3562 static int |
3541 zfs_fid(vnode_t *vp, fid_t *fidp) |
3563 zfs_fid(vnode_t *vp, fid_t *fidp) |
3542 { |
3564 { |
3543 znode_t *zp = VTOZ(vp); |
3565 znode_t *zp = VTOZ(vp); |
3544 zfsvfs_t *zfsvfs = zp->z_zfsvfs; |
3566 zfsvfs_t *zfsvfs = zp->z_zfsvfs; |
3545 uint32_t gen = (uint32_t)zp->z_phys->zp_gen; |
3567 uint32_t gen; |
3546 uint64_t object = zp->z_id; |
3568 uint64_t object = zp->z_id; |
3547 zfid_short_t *zfid; |
3569 zfid_short_t *zfid; |
3548 int size, i; |
3570 int size, i; |
3549 |
3571 |
3550 ZFS_ENTER(zfsvfs); |
3572 ZFS_ENTER_VERIFY_ZP(zfsvfs, zp); |
|
3573 gen = (uint32_t)zp->z_gen; |
3551 |
3574 |
3552 size = (zfsvfs->z_parent != zfsvfs) ? LONG_FID_LEN : SHORT_FID_LEN; |
3575 size = (zfsvfs->z_parent != zfsvfs) ? LONG_FID_LEN : SHORT_FID_LEN; |
3553 if (fidp->fid_len < size) { |
3576 if (fidp->fid_len < size) { |
3554 fidp->fid_len = size; |
3577 fidp->fid_len = size; |
3555 ZFS_EXIT(zfsvfs); |
3578 ZFS_EXIT(zfsvfs); |
3605 return (0); |
3628 return (0); |
3606 |
3629 |
3607 case _PC_XATTR_EXISTS: |
3630 case _PC_XATTR_EXISTS: |
3608 zp = VTOZ(vp); |
3631 zp = VTOZ(vp); |
3609 zfsvfs = zp->z_zfsvfs; |
3632 zfsvfs = zp->z_zfsvfs; |
3610 ZFS_ENTER(zfsvfs); |
3633 ZFS_ENTER_VERIFY_ZP(zfsvfs, zp); |
3611 *valp = 0; |
3634 *valp = 0; |
3612 error = zfs_dirent_lock(&dl, zp, "", &xzp, |
3635 error = zfs_dirent_lock(&dl, zp, "", &xzp, |
3613 ZXATTR | ZEXISTS | ZSHARED); |
3636 ZXATTR | ZEXISTS | ZSHARED); |
3614 if (error == 0) { |
3637 if (error == 0) { |
3615 zfs_dirent_unlock(dl); |
3638 zfs_dirent_unlock(dl); |