@@ -106,13 +106,13 @@ zpl_create(struct inode *dir, struct dentry *dentry, zpl_umode_t mode,
106106
107107 cookie = spl_fstrans_mark ();
108108 error = - zfs_create (dir , dname (dentry ), vap , 0 , mode , & ip , cr , 0 , NULL );
109- spl_fstrans_unmark (cookie );
110109 if (error == 0 ) {
111110 VERIFY0 (zpl_xattr_security_init (ip , dir , & dentry -> d_name ));
112111 VERIFY0 (zpl_init_acl (ip , dir ));
113112 d_instantiate (dentry , ip );
114113 }
115114
115+ spl_fstrans_unmark (cookie );
116116 kmem_free (vap , sizeof (vattr_t ));
117117 crfree (cr );
118118 ASSERT3S (error , <=, 0 );
@@ -144,13 +144,13 @@ zpl_mknod(struct inode *dir, struct dentry *dentry, zpl_umode_t mode,
144144
145145 cookie = spl_fstrans_mark ();
146146 error = - zfs_create (dir , dname (dentry ), vap , 0 , mode , & ip , cr , 0 , NULL );
147- spl_fstrans_unmark (cookie );
148147 if (error == 0 ) {
149148 VERIFY0 (zpl_xattr_security_init (ip , dir , & dentry -> d_name ));
150149 VERIFY0 (zpl_init_acl (ip , dir ));
151150 d_instantiate (dentry , ip );
152151 }
153152
153+ spl_fstrans_unmark (cookie );
154154 kmem_free (vap , sizeof (vattr_t ));
155155 crfree (cr );
156156 ASSERT3S (error , <=, 0 );
@@ -190,13 +190,13 @@ zpl_mkdir(struct inode *dir, struct dentry *dentry, zpl_umode_t mode)
190190
191191 cookie = spl_fstrans_mark ();
192192 error = - zfs_mkdir (dir , dname (dentry ), vap , & ip , cr , 0 , NULL );
193- spl_fstrans_unmark (cookie );
194193 if (error == 0 ) {
195194 VERIFY0 (zpl_xattr_security_init (ip , dir , & dentry -> d_name ));
196195 VERIFY0 (zpl_init_acl (ip , dir ));
197196 d_instantiate (dentry , ip );
198197 }
199198
199+ spl_fstrans_unmark (cookie );
200200 kmem_free (vap , sizeof (vattr_t ));
201201 crfree (cr );
202202 ASSERT3S (error , <=, 0 );
@@ -273,10 +273,10 @@ zpl_setattr(struct dentry *dentry, struct iattr *ia)
273273
274274 cookie = spl_fstrans_mark ();
275275 error = - zfs_setattr (ip , vap , 0 , cr );
276- spl_fstrans_unmark (cookie );
277276 if (!error && (ia -> ia_valid & ATTR_MODE ))
278277 error = zpl_chmod_acl (ip );
279278
279+ spl_fstrans_unmark (cookie );
280280 kmem_free (vap , sizeof (vattr_t ));
281281 crfree (cr );
282282 ASSERT3S (error , <=, 0 );
@@ -317,12 +317,12 @@ zpl_symlink(struct inode *dir, struct dentry *dentry, const char *name)
317317
318318 cookie = spl_fstrans_mark ();
319319 error = - zfs_symlink (dir , dname (dentry ), vap , (char * )name , & ip , cr , 0 );
320- spl_fstrans_unmark (cookie );
321320 if (error == 0 ) {
322321 VERIFY0 (zpl_xattr_security_init (ip , dir , & dentry -> d_name ));
323322 d_instantiate (dentry , ip );
324323 }
325324
325+ spl_fstrans_unmark (cookie );
326326 kmem_free (vap , sizeof (vattr_t ));
327327 crfree (cr );
328328 ASSERT3S (error , <=, 0 );
@@ -391,14 +391,14 @@ zpl_link(struct dentry *old_dentry, struct inode *dir, struct dentry *dentry)
391391
392392 cookie = spl_fstrans_mark ();
393393 error = - zfs_link (dir , ip , dname (dentry ), cr );
394- spl_fstrans_unmark (cookie );
395394 if (error ) {
396395 iput (ip );
397396 goto out ;
398397 }
399398
400399 d_instantiate (dentry , ip );
401400out :
401+ spl_fstrans_unmark (cookie );
402402 crfree (cr );
403403 ASSERT3S (error , <=, 0 );
404404
0 commit comments