[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 <mita@miraclelinux.com> Signed-off-by: Dave Kleikamp <shaggy@austin.ibm.com> (cherry picked from 2b46f77976f798f3fe800809a1d0ed38763c71c8 commit)
This commit is contained in:
committed by
Dave Kleikamp
parent
2a6968a978
commit
087387f90f
@@ -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;
|
||||
|
Reference in New Issue
Block a user