DF-2628 / fix.diff
diff --git a/sys/vfs/hammer2/hammer2_vnops.c b/sys/vfs/hammer2/hammer2_vnops.c index 1111111..2222222 100644 @@ -1598,10 +1598,11 @@ */ error = hammer2_dirent_create(tdip, name, name_len, ip->meta.inum, ip->meta.type); - hammer2_inode_modify(ip); - ++ip->meta.nlinks; - ip->meta.ctime = cmtime; if (error == 0) { + hammer2_inode_modify(ip); + ++ip->meta.nlinks; + ip->meta.ctime = cmtime; + /* * Update dip's [cm]time */ |