patch-2.4.10 linux/fs/ext2/ialloc.c
Next file: linux/fs/ext2/inode.c
Previous file: linux/fs/ext2/fsync.c
Back to the patch index
Back to the overall index
- Lines: 33
- Date:
Tue Sep 11 08:49:47 2001
- Orig file:
v2.4.9/linux/fs/ext2/ialloc.c
- Orig date:
Tue Jul 3 17:08:21 2001
diff -u --recursive --new-file v2.4.9/linux/fs/ext2/ialloc.c linux/fs/ext2/ialloc.c
@@ -194,9 +194,11 @@
* Note: we must free any quota before locking the superblock,
* as writing the quota to disk may need the lock as well.
*/
- DQUOT_INIT(inode);
- DQUOT_FREE_INODE(sb, inode);
- DQUOT_DROP(inode);
+ if (!is_bad_inode(inode)) {
+ /* Quota is already initialized in iput() */
+ DQUOT_FREE_INODE(sb, inode);
+ DQUOT_DROP(inode);
+ }
lock_super (sb);
es = sb->u.ext2_sb.s_es;
@@ -453,7 +455,8 @@
unlock_super (sb);
if(DQUOT_ALLOC_INODE(sb, inode)) {
- sb->dq_op->drop(inode);
+ DQUOT_DROP(inode);
+ inode->i_flags |= S_NOQUOTA;
inode->i_nlink = 0;
iput(inode);
return ERR_PTR(-EDQUOT);
@@ -463,6 +466,7 @@
fail:
unlock_super(sb);
+ make_bad_inode(inode);
iput(inode);
return ERR_PTR(err);
}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)