* The match type in the code for this function should conform to: * * ------------------------------------------------------------------------ * fs type | z_norm | lookup type | match type * ---------|-------------|-------------|---------------------------------- * CS !norm | 0 | 0 | 0 (exact) * CS norm | formX | 0 | MT_NORMALIZE * CI !norm | upper
| 901 | * formX = unicode normalization form set on fs creation |
| 902 | */ |
| 903 | static int |
| 904 | zfs_dropname(zfs_dirlock_t *dl, znode_t *zp, znode_t *dzp, dmu_tx_t *tx, |
| 905 | int flag) |
| 906 | { |
| 907 | int error; |
| 908 | |
| 909 | if (ZTOZSB(zp)->z_norm) { |
| 910 | matchtype_t mt = MT_NORMALIZE; |
| 911 | |
| 912 | if ((ZTOZSB(zp)->z_case == ZFS_CASE_INSENSITIVE && |
| 913 | (flag & ZCIEXACT)) || |
| 914 | (ZTOZSB(zp)->z_case == ZFS_CASE_MIXED && |
| 915 | !(flag & ZCILOOK))) { |
| 916 | mt |= MT_MATCH_CASE; |
| 917 | } |
| 918 | |
| 919 | error = zap_remove_norm(ZTOZSB(zp)->z_os, dzp->z_id, |
| 920 | dl->dl_name, mt, tx); |
| 921 | } else { |
| 922 | error = zap_remove(ZTOZSB(zp)->z_os, dzp->z_id, dl->dl_name, |
| 923 | tx); |
| 924 | } |
| 925 | |
| 926 | return (error); |
| 927 | } |
| 928 | |
| 929 | /* |
| 930 | * Unlink zp from dl, and mark zp for deletion if this was the last link. Can |
no test coverage detected