diff options
| author | Christophe JAILLET <christophe.jaillet@wanadoo.fr> | 2017-06-11 09:21:11 +0200 |
|---|---|---|
| committer | Moyster <oysterized@gmail.com> | 2017-07-21 12:37:51 +0200 |
| commit | f61836c0d162e7e5cc2b0ae18b1d0601cd76beba (patch) | |
| tree | 3b6bb0264440a5b355bbc1fbaf1342d6b2b7c9e9 /fs/f2fs | |
| parent | 0f2162ac068983eb429a791222db92d5acb296c2 (diff) | |
f2fs: Fix a return value in case of error in 'f2fs_fill_super'
err must be set to -ENOMEM, otherwise we return 0.
Fixes: a912b54d3aaa0 ("f2fs: split bio cache")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Reviewed-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs')
| -rw-r--r-- | fs/f2fs/super.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c index cb79e6ee5..c582f3785 100644 --- a/fs/f2fs/super.c +++ b/fs/f2fs/super.c @@ -1983,8 +1983,10 @@ try_onemore: sbi->write_io[i] = kmalloc(n * sizeof(struct f2fs_bio_info), GFP_KERNEL); - if (!sbi->write_io[i]) + if (!sbi->write_io[i]) { + err = -ENOMEM; goto free_options; + } for (j = HOT; j < n; j++) { init_rwsem(&sbi->write_io[i][j].io_rwsem); |
