Diff for /xfs-linux/linux-2.6/xfs_iops.c between versions 1.236 and 1.237

version 1.236, 2006/01/16 04:57:00 version 1.237, 2006/01/24 20:38:10
Line 261  has_fs_struct(struct task_struct *task) Line 261  has_fs_struct(struct task_struct *task)
         return (task->fs != init_task.fs);          return (task->fs != init_task.fs);
 }  }
   
   STATIC inline void
   cleanup_inode(
           vnode_t         *dvp,
           vnode_t         *vp,
           struct dentry   *dentry,        
           int             mode)
   {
           struct dentry   teardown = {};
           int             err2;
   
           /* Oh, the horror.
            * If we can't add the ACL or we fail in 
            * linvfs_init_security we must back out.
            * ENOSPC can hit here, among other things.
            */
           teardown.d_inode = LINVFS_GET_IP(vp);
           teardown.d_name = dentry->d_name;
   
           if (S_ISDIR(mode))
                   VOP_RMDIR(dvp, &teardown, NULL, err2);
           else
                   VOP_REMOVE(dvp, &teardown, NULL, err2);
           VN_RELE(vp);
   }
   
 STATIC int  STATIC int
 linvfs_mknod(  linvfs_mknod(
         struct inode    *dir,          struct inode    *dir,
Line 315  linvfs_mknod( Line 340  linvfs_mknod(
         }          }
   
         if (!error)          if (!error)
           {
                 error = linvfs_init_security(vp, dir);                  error = linvfs_init_security(vp, dir);
                   if (error)
                           cleanup_inode(dvp, vp, dentry, mode);
           }
   
         if (default_acl) {          if (default_acl) {
                 if (!error) {                  if (!error) {
                         error = _ACL_INHERIT(vp, &va, default_acl);                          error = _ACL_INHERIT(vp, &va, default_acl);
                         if (!error) {                          if (!error) 
                                 VMODIFY(vp);                                  VMODIFY(vp);
                         } else {                          else
                                 struct dentry   teardown = {};                                  cleanup_inode(dvp, vp, dentry, mode);
                                 int             err2;  
   
                                 /* Oh, the horror.  
                                  * If we can't add the ACL we must back out.  
                                  * ENOSPC can hit here, among other things.  
                                  */  
                                 teardown.d_inode = ip = LINVFS_GET_IP(vp);  
                                 teardown.d_name = dentry->d_name;  
   
                                 if (S_ISDIR(mode))  
                                         VOP_RMDIR(dvp, &teardown, NULL, err2);  
                                 else  
                                         VOP_REMOVE(dvp, &teardown, NULL, err2);  
                                 VN_RELE(vp);  
                         }  
                 }                  }
                 _ACL_FREE(default_acl);                  _ACL_FREE(default_acl);
         }          }

Removed from v.1.236  
changed lines
  Added in v.1.237


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>