diff options
author | Linus Torvalds <torvalds@g5.osdl.org> | 2006-10-02 17:27:09 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-10-02 17:27:09 +0200 |
commit | 44f549217cd26daf7063984ae4ee6e46beca9c41 (patch) | |
tree | 8128955710d052cf2485857e58e616304989b13e /fs/jfs/jfs_inode.c | |
parent | Merge git://git.infradead.org/mtd-2.6 (diff) | |
parent | JFS: White space cleanup (diff) | |
download | linux-44f549217cd26daf7063984ae4ee6e46beca9c41.tar.xz linux-44f549217cd26daf7063984ae4ee6e46beca9c41.zip |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/shaggy/jfs-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/shaggy/jfs-2.6:
JFS: White space cleanup
[PATCH] JFS: return correct error when i-node allocation failed
JFS: Remove shadow variable from fs/jfs/jfs_txnmgr.c:xtLog()
Diffstat (limited to 'fs/jfs/jfs_inode.c')
-rw-r--r-- | fs/jfs/jfs_inode.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/fs/jfs/jfs_inode.c b/fs/jfs/jfs_inode.c index bffaca9ae3a2..4c67ed97682b 100644 --- a/fs/jfs/jfs_inode.c +++ b/fs/jfs/jfs_inode.c @@ -3,16 +3,16 @@ * * 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 - * the Free Software Foundation; either version 2 of the License, or + * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See * the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software + * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ @@ -61,7 +61,7 @@ struct inode *ialloc(struct inode *parent, umode_t mode) inode = new_inode(sb); if (!inode) { jfs_warn("ialloc: new_inode returned NULL!"); - return inode; + return ERR_PTR(-ENOMEM); } jfs_inode = JFS_IP(inode); @@ -69,9 +69,10 @@ struct inode *ialloc(struct inode *parent, umode_t mode) rc = diAlloc(parent, S_ISDIR(mode), inode); if (rc) { jfs_warn("ialloc: diAlloc returned %d!", rc); - make_bad_inode(inode); + if (rc == -EIO) + make_bad_inode(inode); iput(inode); - return NULL; + return ERR_PTR(rc); } inode->i_uid = current->fsuid; @@ -97,7 +98,7 @@ struct inode *ialloc(struct inode *parent, umode_t mode) inode->i_flags |= S_NOQUOTA; inode->i_nlink = 0; iput(inode); - return NULL; + return ERR_PTR(-EDQUOT); } inode->i_mode = mode; |