diff options
author | Rui Xiang <rui.xiang@huawei.com> | 2014-01-23 15:56:19 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-01-23 16:37:04 -0800 |
commit | 40e2c71d57565a82970a5a2b75f7eb67bb3252f4 (patch) | |
tree | eb652db714dfb7d4565baa3c124c9f2d982394fd /fs/romfs | |
parent | 3089a4c8d3abc7e2ab105d1d39d415110d1566d6 (diff) | |
download | linux-stable-40e2c71d57565a82970a5a2b75f7eb67bb3252f4.tar.gz linux-stable-40e2c71d57565a82970a5a2b75f7eb67bb3252f4.tar.bz2 linux-stable-40e2c71d57565a82970a5a2b75f7eb67bb3252f4.zip |
romfs: fix returm err while getting inode in fill_super
Getting an inode by romfs_iget may lead to an err in fill_super, and the
err value should be return.
And it should return -ENOMEM instead while d_make_root fails, fix it too.
Signed-off-by: Rui Xiang <rui.xiang@huawei.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/romfs')
-rw-r--r-- | fs/romfs/super.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/fs/romfs/super.c b/fs/romfs/super.c index ff1d3d42e72a..d8418782862b 100644 --- a/fs/romfs/super.c +++ b/fs/romfs/super.c @@ -533,16 +533,14 @@ static int romfs_fill_super(struct super_block *sb, void *data, int silent) root = romfs_iget(sb, pos); if (IS_ERR(root)) - goto error; + return PTR_ERR(root); sb->s_root = d_make_root(root); if (!sb->s_root) - goto error; + return -ENOMEM; return 0; -error: - return -EINVAL; error_rsb_inval: ret = -EINVAL; error_rsb: |