Deleted Added
full compact
zfs_replay.c (168404) zfs_replay.c (169884)
1/*
2 * CDDL HEADER START
3 *
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
7 *
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE

--- 144 unchanged lines hidden (view full) ---

153
154 if ((error = zfs_zget(zfsvfs, lr->lr_doid, &dzp)) != 0)
155 return (error);
156
157 cn.cn_nameptr = name;
158 cn.cn_namelen = strlen(name);
159 cn.cn_nameiop = DELETE;
160 cn.cn_flags = ISLASTCN | SAVENAME;
1/*
2 * CDDL HEADER START
3 *
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
7 *
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE

--- 144 unchanged lines hidden (view full) ---

153
154 if ((error = zfs_zget(zfsvfs, lr->lr_doid, &dzp)) != 0)
155 return (error);
156
157 cn.cn_nameptr = name;
158 cn.cn_namelen = strlen(name);
159 cn.cn_nameiop = DELETE;
160 cn.cn_flags = ISLASTCN | SAVENAME;
161 cn.cn_lkflags = LK_EXCLUSIVE | LK_RETRY;
161 cn.cn_cred = kcred;
162 cn.cn_thread = curthread;
163 vn_lock(ZTOV(dzp), LK_EXCLUSIVE | LK_RETRY, curthread);
164 error = VOP_LOOKUP(ZTOV(dzp), &vp, &cn);
165 if (error != 0) {
166 VOP_UNLOCK(ZTOV(dzp), 0, curthread);
167 goto fail;
168 }

--- 75 unchanged lines hidden (view full) ---

244 }
245
246 svp = tvp = NULL;
247
248 scn.cn_nameptr = sname;
249 scn.cn_namelen = strlen(sname);
250 scn.cn_nameiop = DELETE;
251 scn.cn_flags = ISLASTCN | SAVENAME;
162 cn.cn_cred = kcred;
163 cn.cn_thread = curthread;
164 vn_lock(ZTOV(dzp), LK_EXCLUSIVE | LK_RETRY, curthread);
165 error = VOP_LOOKUP(ZTOV(dzp), &vp, &cn);
166 if (error != 0) {
167 VOP_UNLOCK(ZTOV(dzp), 0, curthread);
168 goto fail;
169 }

--- 75 unchanged lines hidden (view full) ---

245 }
246
247 svp = tvp = NULL;
248
249 scn.cn_nameptr = sname;
250 scn.cn_namelen = strlen(sname);
251 scn.cn_nameiop = DELETE;
252 scn.cn_flags = ISLASTCN | SAVENAME;
253 scn.cn_lkflags = LK_EXCLUSIVE | LK_RETRY;
252 scn.cn_cred = kcred;
253 scn.cn_thread = td;
254 vn_lock(ZTOV(sdzp), LK_EXCLUSIVE | LK_RETRY, td);
255 error = VOP_LOOKUP(ZTOV(sdzp), &svp, &scn);
256 VOP_UNLOCK(ZTOV(sdzp), 0, td);
257 if (error != 0)
258 goto fail;
259 VOP_UNLOCK(svp, 0, td);
260
261 tcn.cn_nameptr = tname;
262 tcn.cn_namelen = strlen(tname);
263 tcn.cn_nameiop = RENAME;
264 tcn.cn_flags = ISLASTCN | SAVENAME;
254 scn.cn_cred = kcred;
255 scn.cn_thread = td;
256 vn_lock(ZTOV(sdzp), LK_EXCLUSIVE | LK_RETRY, td);
257 error = VOP_LOOKUP(ZTOV(sdzp), &svp, &scn);
258 VOP_UNLOCK(ZTOV(sdzp), 0, td);
259 if (error != 0)
260 goto fail;
261 VOP_UNLOCK(svp, 0, td);
262
263 tcn.cn_nameptr = tname;
264 tcn.cn_namelen = strlen(tname);
265 tcn.cn_nameiop = RENAME;
266 tcn.cn_flags = ISLASTCN | SAVENAME;
267 tcn.cn_lkflags = LK_EXCLUSIVE | LK_RETRY;
265 tcn.cn_cred = kcred;
266 tcn.cn_thread = td;
267 vn_lock(ZTOV(tdzp), LK_EXCLUSIVE | LK_RETRY, td);
268 error = VOP_LOOKUP(ZTOV(tdzp), &tvp, &tcn);
269 if (error == EJUSTRETURN)
270 tvp = NULL;
271 else if (error != 0) {
272 VOP_UNLOCK(ZTOV(tdzp), 0, td);

--- 152 unchanged lines hidden ---
268 tcn.cn_cred = kcred;
269 tcn.cn_thread = td;
270 vn_lock(ZTOV(tdzp), LK_EXCLUSIVE | LK_RETRY, td);
271 error = VOP_LOOKUP(ZTOV(tdzp), &tvp, &tcn);
272 if (error == EJUSTRETURN)
273 tvp = NULL;
274 else if (error != 0) {
275 VOP_UNLOCK(ZTOV(tdzp), 0, td);

--- 152 unchanged lines hidden ---