X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=fs%2Fjfs%2Finode.c;h=d94abccb9fb1bf49083f8a5f5664495026f0c924;hb=c7b5ebbddf7bcd3651947760f423e3783bbe6573;hp=2b70f813e76ec34e7125df51fd1035c866d72583;hpb=a2c21200f1c81b08cb55e417b68150bba439b646;p=linux-2.6.git diff --git a/fs/jfs/inode.c b/fs/jfs/inode.c index 2b70f813e..d94abccb9 100644 --- a/fs/jfs/inode.c +++ b/fs/jfs/inode.c @@ -1,6 +1,6 @@ /* - * Copyright (c) International Business Machines Corp., 2000-2002 - * Portions Copyright (c) Christoph Hellwig, 2001-2002 + * Copyright (C) International Business Machines Corp., 2000-2004 + * Portions Copyright (C) Christoph Hellwig, 2001-2002 * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -21,6 +21,7 @@ #include #include #include +#include #include "jfs_incore.h" #include "jfs_filsys.h" #include "jfs_imap.h" @@ -105,10 +106,10 @@ int jfs_commit_inode(struct inode *inode, int wait) return rc; } -void jfs_write_inode(struct inode *inode, int wait) +int jfs_write_inode(struct inode *inode, int wait) { if (test_cflag(COMMIT_Nolink, inode)) - return; + return 0; /* * If COMMIT_DIRTY is not set, the inode isn't really dirty. * It has been committed since the last change, but was still @@ -117,12 +118,14 @@ void jfs_write_inode(struct inode *inode, int wait) if (!test_cflag(COMMIT_Dirty, inode)) { /* Make sure committed changes hit the disk */ jfs_flush_journal(JFS_SBI(inode->i_sb)->log, wait); - return; + return 0; } if (jfs_commit_inode(inode, wait)) { jfs_err("jfs_write_inode: jfs_commit_inode failed!"); - } + return -EIO; + } else + return 0; } void jfs_delete_inode(struct inode *inode) @@ -134,6 +137,13 @@ void jfs_delete_inode(struct inode *inode) diFree(inode); + /* + * Free the inode from the quota allocation. + */ + DQUOT_INIT(inode); + DQUOT_FREE_INODE(inode); + DQUOT_DROP(inode); + clear_inode(inode); }