From 087387f90f577f5a0ab68d33ef326c9bb6d80dda Mon Sep 17 00:00:00 2001 From: Akinobu Mita Date: Thu, 14 Sep 2006 09:22:38 -0500 Subject: [PATCH] JFS: return correct error when i-node allocation failed I have seen confusing behavior on JFS when I injected many intentional slab allocation errors. The cp command failed with no disk space error with enough disk space. This patch makes: - change the return value in case slab allocation failures happen from -ENOSPC to -ENOMEM - ialloc() return error code so that the caller can know the reason of failures Signed-off-by: Akinobu Mita Signed-off-by: Dave Kleikamp (cherry picked from 2b46f77976f798f3fe800809a1d0ed38763c71c8 commit) --- fs/jfs/super.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'fs/jfs/super.c') diff --git a/fs/jfs/super.c b/fs/jfs/super.c index 143bcd1d5eaa..fc6951587c6b 100644 --- a/fs/jfs/super.c +++ b/fs/jfs/super.c @@ -422,7 +422,7 @@ static int jfs_fill_super(struct super_block *sb, void *data, int silent) sbi = kzalloc(sizeof (struct jfs_sb_info), GFP_KERNEL); if (!sbi) - return -ENOSPC; + return -ENOMEM; sb->s_fs_info = sbi; sbi->sb = sb; sbi->uid = sbi->gid = sbi->umask = -1; -- cgit From 63f83c9fcf40ab61b75edf5d2f2c1ae6bf876482 Mon Sep 17 00:00:00 2001 From: Dave Kleikamp Date: Mon, 2 Oct 2006 09:55:27 -0500 Subject: JFS: White space cleanup Removed trailing spaces & tabs, and spaces preceding tabs. Also a couple very minor comment cleanups. Signed-off-by: Dave Kleikamp (cherry picked from f74156539964d7b3d5164fdf8848e6a682f75b97 commit) --- fs/jfs/super.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'fs/jfs/super.c') diff --git a/fs/jfs/super.c b/fs/jfs/super.c index fc6951587c6b..9c1c6e0e633d 100644 --- a/fs/jfs/super.c +++ b/fs/jfs/super.c @@ -4,16 +4,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 */ @@ -82,7 +82,7 @@ static void jfs_handle_error(struct super_block *sb) "as read-only\n", sb->s_id); sb->s_flags |= MS_RDONLY; - } + } /* nothing is done for continue beyond marking the superblock dirty */ } @@ -775,7 +775,7 @@ static int __init init_jfs_fs(void) int rc; jfs_inode_cachep = - kmem_cache_create("jfs_ip", sizeof(struct jfs_inode_info), 0, + kmem_cache_create("jfs_ip", sizeof(struct jfs_inode_info), 0, SLAB_RECLAIM_ACCOUNT|SLAB_MEM_SPREAD, init_once, NULL); if (jfs_inode_cachep == NULL) -- cgit