Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge git://oss.sgi.com:8090/oss/git/xfs-2.6

+39 -18
+7
fs/xfs/linux-2.6/xfs_buf.c
··· 822 822 823 823 XB_TRACE(bp, "rele", bp->b_relse); 824 824 825 + if (unlikely(!hash)) { 826 + ASSERT(!bp->b_relse); 827 + if (atomic_dec_and_test(&bp->b_hold)) 828 + xfs_buf_free(bp); 829 + return; 830 + } 831 + 825 832 if (atomic_dec_and_lock(&bp->b_hold, &hash->bh_lock)) { 826 833 if (bp->b_relse) { 827 834 atomic_inc(&bp->b_hold);
+32 -18
fs/xfs/linux-2.6/xfs_iops.c
··· 262 262 return (task->fs != init_task.fs); 263 263 } 264 264 265 + STATIC inline void 266 + cleanup_inode( 267 + vnode_t *dvp, 268 + vnode_t *vp, 269 + struct dentry *dentry, 270 + int mode) 271 + { 272 + struct dentry teardown = {}; 273 + int err2; 274 + 275 + /* Oh, the horror. 276 + * If we can't add the ACL or we fail in 277 + * linvfs_init_security we must back out. 278 + * ENOSPC can hit here, among other things. 279 + */ 280 + teardown.d_inode = LINVFS_GET_IP(vp); 281 + teardown.d_name = dentry->d_name; 282 + 283 + if (S_ISDIR(mode)) 284 + VOP_RMDIR(dvp, &teardown, NULL, err2); 285 + else 286 + VOP_REMOVE(dvp, &teardown, NULL, err2); 287 + VN_RELE(vp); 288 + } 289 + 265 290 STATIC int 266 291 linvfs_mknod( 267 292 struct inode *dir, ··· 341 316 } 342 317 343 318 if (!error) 319 + { 344 320 error = linvfs_init_security(vp, dir); 321 + if (error) 322 + cleanup_inode(dvp, vp, dentry, mode); 323 + } 345 324 346 325 if (default_acl) { 347 326 if (!error) { 348 327 error = _ACL_INHERIT(vp, &va, default_acl); 349 - if (!error) { 328 + if (!error) 350 329 VMODIFY(vp); 351 - } else { 352 - struct dentry teardown = {}; 353 - int err2; 354 - 355 - /* Oh, the horror. 356 - * If we can't add the ACL we must back out. 357 - * ENOSPC can hit here, among other things. 358 - */ 359 - teardown.d_inode = ip = LINVFS_GET_IP(vp); 360 - teardown.d_name = dentry->d_name; 361 - 362 - if (S_ISDIR(mode)) 363 - VOP_RMDIR(dvp, &teardown, NULL, err2); 364 - else 365 - VOP_REMOVE(dvp, &teardown, NULL, err2); 366 - VN_RELE(vp); 367 - } 330 + else 331 + cleanup_inode(dvp, vp, dentry, mode); 368 332 } 369 333 _ACL_FREE(default_acl); 370 334 }