patch-2.1.101 linux/fs/ext2/ialloc.c

Next file: linux/fs/ext2/namei.c
Previous file: linux/fs/ext2/balloc.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.100/linux/fs/ext2/ialloc.c linux/fs/ext2/ialloc.c
@@ -33,6 +33,7 @@
 #include <linux/stat.h>
 #include <linux/string.h>
 #include <linux/locks.h>
+#include <linux/quotaops.h>
 
 #include <asm/bitops.h>
 #include <asm/byteorder.h>
@@ -231,8 +232,7 @@
 	is_directory = S_ISDIR(inode->i_mode);
 
 	/* Do this BEFORE marking the inode not in use */
-	if (sb->dq_op)
-		sb->dq_op->free_inode (inode, 1);
+	DQUOT_FREE_INODE(sb, inode);
 	clear_inode (inode);
 
 	/* Ok, now we can actually update the inode bitmaps.. */
@@ -493,17 +493,7 @@
 	inc_inode_version (inode, gdp, mode);
 
 	unlock_super (sb);
-	if (sb->dq_op) {
-		sb->dq_op->initialize (inode, -1);
-		if (sb->dq_op->alloc_inode (inode, 1)) {
-			sb->dq_op->drop (inode);
-			inode->i_nlink = 0;
-			iput (inode);
-			*err = -EDQUOT;
-			return NULL;
-		}
-		inode->i_flags |= S_WRITE;
-	}
+	DQUOT_ALLOC_INODE(sb, inode);
 	ext2_debug ("allocating inode %lu\n", inode->i_ino);
 
 	*err = 0;

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov