nfsd4: use common rpc_cred for all callbacks
[safe/jmp/linux-2.6] / fs / ext2 / ialloc.c
index b5598e1..15387c9 100644 (file)
@@ -121,8 +121,8 @@ void ext2_free_inode (struct inode * inode)
        if (!is_bad_inode(inode)) {
                /* Quota is already initialized in iput() */
                ext2_xattr_delete_inode(inode);
-               DQUOT_FREE_INODE(inode);
-               DQUOT_DROP(inode);
+               vfs_dq_free_inode(inode);
+               vfs_dq_drop(inode);
        }
 
        es = EXT2_SB(sb)->s_es;
@@ -565,12 +565,8 @@ got:
        inode->i_blocks = 0;
        inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME_SEC;
        memset(ei->i_data, 0, sizeof(ei->i_data));
-       ei->i_flags = EXT2_I(dir)->i_flags & EXT2_FL_INHERITED;
-       if (S_ISLNK(mode))
-               ei->i_flags &= ~(EXT2_IMMUTABLE_FL|EXT2_APPEND_FL);
-       /* dirsync is only applied to directories */
-       if (!S_ISDIR(mode))
-               ei->i_flags &= ~EXT2_DIRSYNC_FL;
+       ei->i_flags =
+               ext2_mask_flags(mode, EXT2_I(dir)->i_flags & EXT2_FL_INHERITED);
        ei->i_faddr = 0;
        ei->i_frag_no = 0;
        ei->i_frag_size = 0;
@@ -590,7 +586,7 @@ got:
                goto fail_drop;
        }
 
-       if (DQUOT_ALLOC_INODE(inode)) {
+       if (vfs_dq_alloc_inode(inode)) {
                err = -EDQUOT;
                goto fail_drop;
        }
@@ -609,10 +605,10 @@ got:
        return inode;
 
 fail_free_drop:
-       DQUOT_FREE_INODE(inode);
+       vfs_dq_free_inode(inode);
 
 fail_drop:
-       DQUOT_DROP(inode);
+       vfs_dq_drop(inode);
        inode->i_flags |= S_NOQUOTA;
        inode->i_nlink = 0;
        unlock_new_inode(inode);