aboutsummaryrefslogtreecommitdiffstats
path: root/fs/jfs/jfs_inode.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/jfs/jfs_inode.c')
-rw-r--r--fs/jfs/jfs_inode.c15
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 @@
3 * 3 *
4 * This program is free software; you can redistribute it and/or modify 4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by 5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or 6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version. 7 * (at your option) any later version.
8 * 8 *
9 * This program is distributed in the hope that it will be useful, 9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
12 * the GNU General Public License for more details. 12 * the GNU General Public License for more details.
13 * 13 *
14 * You should have received a copy of the GNU General Public License 14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software 15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 */ 17 */
18 18
@@ -61,7 +61,7 @@ struct inode *ialloc(struct inode *parent, umode_t mode)
61 inode = new_inode(sb); 61 inode = new_inode(sb);
62 if (!inode) { 62 if (!inode) {
63 jfs_warn("ialloc: new_inode returned NULL!"); 63 jfs_warn("ialloc: new_inode returned NULL!");
64 return inode; 64 return ERR_PTR(-ENOMEM);
65 } 65 }
66 66
67 jfs_inode = JFS_IP(inode); 67 jfs_inode = JFS_IP(inode);
@@ -69,9 +69,10 @@ struct inode *ialloc(struct inode *parent, umode_t mode)
69 rc = diAlloc(parent, S_ISDIR(mode), inode); 69 rc = diAlloc(parent, S_ISDIR(mode), inode);
70 if (rc) { 70 if (rc) {
71 jfs_warn("ialloc: diAlloc returned %d!", rc); 71 jfs_warn("ialloc: diAlloc returned %d!", rc);
72 make_bad_inode(inode); 72 if (rc == -EIO)
73 make_bad_inode(inode);
73 iput(inode); 74 iput(inode);
74 return NULL; 75 return ERR_PTR(rc);
75 } 76 }
76 77
77 inode->i_uid = current->fsuid; 78 inode->i_uid = current->fsuid;
@@ -97,7 +98,7 @@ struct inode *ialloc(struct inode *parent, umode_t mode)
97 inode->i_flags |= S_NOQUOTA; 98 inode->i_flags |= S_NOQUOTA;
98 inode->i_nlink = 0; 99 inode->i_nlink = 0;
99 iput(inode); 100 iput(inode);
100 return NULL; 101 return ERR_PTR(-EDQUOT);
101 } 102 }
102 103
103 inode->i_mode = mode; 104 inode->i_mode = mode;