···822822823823 XB_TRACE(bp, "rele", bp->b_relse);824824825825+ if (unlikely(!hash)) {826826+ ASSERT(!bp->b_relse);827827+ if (atomic_dec_and_test(&bp->b_hold))828828+ xfs_buf_free(bp);829829+ return;830830+ }831831+825832 if (atomic_dec_and_lock(&bp->b_hold, &hash->bh_lock)) {826833 if (bp->b_relse) {827834 atomic_inc(&bp->b_hold);
+32-18
fs/xfs/linux-2.6/xfs_iops.c
···262262 return (task->fs != init_task.fs);263263}264264265265+STATIC inline void266266+cleanup_inode(267267+ vnode_t *dvp,268268+ vnode_t *vp,269269+ struct dentry *dentry, 270270+ int mode)271271+{272272+ struct dentry teardown = {};273273+ int err2;274274+275275+ /* Oh, the horror.276276+ * If we can't add the ACL or we fail in 277277+ * linvfs_init_security we must back out.278278+ * ENOSPC can hit here, among other things.279279+ */280280+ teardown.d_inode = LINVFS_GET_IP(vp);281281+ teardown.d_name = dentry->d_name;282282+283283+ if (S_ISDIR(mode))284284+ VOP_RMDIR(dvp, &teardown, NULL, err2);285285+ else286286+ VOP_REMOVE(dvp, &teardown, NULL, err2);287287+ VN_RELE(vp);288288+}289289+265290STATIC int266291linvfs_mknod(267292 struct inode *dir,···341316 }342317343318 if (!error)319319+ {344320 error = linvfs_init_security(vp, dir);321321+ if (error)322322+ cleanup_inode(dvp, vp, dentry, mode);323323+ }345324346325 if (default_acl) {347326 if (!error) {348327 error = _ACL_INHERIT(vp, &va, default_acl);349349- if (!error) {328328+ if (!error) 350329 VMODIFY(vp);351351- } else {352352- struct dentry teardown = {};353353- int err2;354354-355355- /* Oh, the horror.356356- * If we can't add the ACL we must back out.357357- * ENOSPC can hit here, among other things.358358- */359359- teardown.d_inode = ip = LINVFS_GET_IP(vp);360360- teardown.d_name = dentry->d_name;361361-362362- if (S_ISDIR(mode))363363- VOP_RMDIR(dvp, &teardown, NULL, err2);364364- else365365- VOP_REMOVE(dvp, &teardown, NULL, err2);366366- VN_RELE(vp);367367- }330330+ else331331+ cleanup_inode(dvp, vp, dentry, mode);368332 }369333 _ACL_FREE(default_acl);370334 }